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/contact/src/ |
Upload File : |
<?php namespace Drupal\contact; use Drupal\Core\Config\Entity\ConfigEntityListBuilder; use Drupal\Core\Entity\EntityInterface; /** * Defines a class to build a listing of contact form entities. * * @see \Drupal\contact\Entity\ContactForm */ class ContactFormListBuilder extends ConfigEntityListBuilder { /** * {@inheritdoc} */ public function buildHeader() { $header['form'] = t('Form'); $header['recipients'] = t('Recipients'); $header['selected'] = t('Selected'); return $header + parent::buildHeader(); } /** * {@inheritdoc} */ public function buildRow(EntityInterface $entity) { // Special case the personal form. if ($entity->id() == 'personal') { $row['form'] = $entity->label(); $row['recipients'] = t('Selected user'); $row['selected'] = t('No'); } else { $row['form'] = $entity->link(NULL, 'canonical'); $row['recipients']['data'] = [ '#theme' => 'item_list', '#items' => $entity->getRecipients(), '#context' => ['list_style' => 'comma-list'], ]; $default_form = \Drupal::config('contact.settings')->get('default_form'); $row['selected'] = ($default_form == $entity->id() ? t('Yes') : t('No')); } return $row + parent::buildRow($entity); } }