当前位置: 首页>>代码示例>>PHP>>正文


PHP EntityListBuilder::render方法代码示例

本文整理汇总了PHP中Drupal\Core\Entity\EntityListBuilder::render方法的典型用法代码示例。如果您正苦于以下问题:PHP EntityListBuilder::render方法的具体用法?PHP EntityListBuilder::render怎么用?PHP EntityListBuilder::render使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Drupal\Core\Entity\EntityListBuilder的用法示例。


在下文中一共展示了EntityListBuilder::render方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: render

 /**
  * {@inheritdoc}
  */
 public function render()
 {
     $build = parent::render();
     // Override the empty text.
     $build['table']['#empty'] = $this->t('There are no @label entities yet.', ['@label' => $this->entityType->getLabel()]);
     return $build;
 }
开发者ID:heddn,项目名称:content_entity_base,代码行数:10,代码来源:EntityBaseListBuilder.php

示例2: render

 /**
  * {@inheritdoc}
  *
  * @param EntityInterface $event
  *   The event entity to display registrations.
  */
 public function render(EntityInterface $event = NULL)
 {
     if (isset($event)) {
         $this->event = $event;
     }
     $render = parent::render();
     $render['table']['#empty'] = t('No registrations found for this event.');
     return $render;
 }
开发者ID:justincletus,项目名称:webdrupalpro,代码行数:15,代码来源:RegistrationListBuilder.php

示例3: render

 /**
  * {@inheritdoc}
  *
  * @param EntityInterface $event
  *   The event entity to display registrations.
  */
 public function render(EntityInterface $event = NULL)
 {
     if (isset($event)) {
         $this->event = $event;
     }
     drupal_set_message($this->t('This rule list is for advanced users. Take care when committing any actions from this page.'), 'warning');
     $render = parent::render();
     $render['table']['#empty'] = t('No rules found for this event.');
     return $render;
 }
开发者ID:justincletus,项目名称:webdrupalpro,代码行数:16,代码来源:RuleListBuilder.php

示例4: render

 /**
  * {@inheritdoc}
  *
  * @param EntityInterface $event
  *   The event entity to display registrations.
  */
 public function render(EntityInterface $event = NULL)
 {
     if (isset($event)) {
         $this->event = $event;
     }
     $render['description'] = ['#prefix' => '<p>', '#markup' => $this->t('Groups allow you to organize registrations. Some pre-made groups are automatically applied to registrations.'), '#suffix' => '</p>'];
     $render = parent::render();
     $render['table']['#empty'] = t('No groups found for this event.');
     return $render;
 }
开发者ID:justincletus,项目名称:webdrupalpro,代码行数:16,代码来源:GroupListBuilder.php

示例5: render

 /**
  * {@inheritdoc}
  */
 public function render()
 {
     $table = parent::render();
     $filter = $this->getFilterLabels();
     usort($table['#rows'], array($this, 'sortRows'));
     $build['filters'] = array('#type' => 'container', '#attributes' => array('class' => array('table-filter', 'js-show')));
     $build['filters']['text'] = array('#type' => 'search', '#title' => $this->t('Search'), '#size' => 30, '#placeholder' => $filter['placeholder'], '#attributes' => array('class' => array('table-filter-text'), 'data-table' => '.config-translation-entity-list', 'autocomplete' => 'off', 'title' => $filter['description']));
     $build['table'] = $table;
     $build['table']['#attributes']['class'][] = 'config-translation-entity-list';
     $build['#attached']['library'][] = 'system/drupal.system.modules';
     return $build;
 }
开发者ID:davidsoloman,项目名称:drupalconsole.com,代码行数:15,代码来源:ConfigTranslationEntityListBuilder.php

示例6: render

 /**
  * {@inheritdoc}
  *
  * We override ::render() so that we can add our own content above the table.
  * parent::render() is where EntityListBuilder creates the table using our
  * buildHeader() and buildRow() implementations.
  */
 public function render()
 {
     /** @var RdfEntitySparqlStorage $storage */
     $storage = $this->storage;
     $definitions = $storage->getGraphDefinitions();
     if (count($definitions)) {
         $options = [];
         foreach ($definitions as $name => $definition) {
             $options[$name] = $definition['title'];
         }
         // Embed the graph selection form.
         $form = \Drupal::formBuilder()->getForm('Drupal\\rdf_entity\\Form\\GraphSelectForm', $options);
         if ($form) {
             $build['graph_form'] = $form;
         }
     }
     $build['table'] = parent::render();
     return $build;
 }
开发者ID:ec-europa,项目名称:joinup-dev,代码行数:26,代码来源:RdfListBuilder.php

示例7: render

 /**
  * {@inheritdoc}
  *
  * Builds the entity listing as renderable array for table.html.twig.
  *
  * @todo Add a link to add a new item to the #empty text.
  */
 public function render()
 {
     $build = array();
     // @todo d8-port: get pager working.
     $this->limit = \Drupal::config('workflow.settings')->get('workflow_states_per_page');
     // TODO D8-port
     // $output .= theme('pager', array('tags' => $limit)); // TODO D8-port
     // @todo d8-port: get core title working: $build['table']['#title'] by getTitle() is not working.
     $build['workflow_list_title'] = array('#markup' => $this->getTitle());
     $build += parent::render();
     // Add a footer. This is not yet added in EntityListBilder::render()
     if ($this->footer_needed) {
         // TODO D8-port: test this.
         // Two variants. First variant is official, but I like 2nd better.
         /*
           $build['table']['#footer'] = array(
             array(
               'class' => array('footer-class'),
               'data' => array(
                 array(
                   'data' => WORKFLOW_MARK_STATE_IS_DELETED . ' ' . t('State is no longer available.'),
                   'colspan' => count($build['table']['#header']),
                 ),
               ),
             ),
           );
         */
         $build['workflow_footer'] = array('#markup' => WORKFLOW_MARK_STATE_IS_DELETED . ' ' . t('State is no longer available.'), '#weight' => 500);
     }
     return $build;
 }
开发者ID:sedurzu,项目名称:ildeposito8,代码行数:38,代码来源:WorkflowTransitionListBuilder.php

示例8: render

 /**
  * {@inheritdoc}
  */
 public function render()
 {
     $build['description'] = array('#markup' => $this->t('Entity settings'));
     $build['table'] = parent::render();
     return $build;
 }
开发者ID:jokas,项目名称:d8.dev,代码行数:9,代码来源:EckEntityListBuilder.php

示例9: render

 /**
  * {@inheritdoc}
  *
  * We override ::render() so that we can add our own content above the table.
  * parent::render() is where EntityListBuilder creates the table using our
  * buildHeader() and buildRow() implementations.
  */
 public function render()
 {
     $build['description'] = array('#markup' => $this->t('Content Entity Example implements a Reservation model. These reservations are not fieldable entities. You can manage the fields on the <a href="@adminlink">Reservation admin page</a>.', array('@adminlink' => \Drupal::urlGenerator()->generateFromRoute('entity.reservation.list'))));
     $build['table'] = parent::render();
     return $build;
 }
开发者ID:wallecan,项目名称:drupalpp,代码行数:13,代码来源:ReservationListBuilder.php

示例10: render

 /**
  * {@inheritdoc}
  */
 public function render()
 {
     $build = parent::render();
     $build['table']['#empty'] = $this->t('No people available.');
     return $build;
 }
开发者ID:ddrozdik,项目名称:dmaps,代码行数:9,代码来源:UserListBuilder.php

示例11: render

 /**
  * {@inheritdoc}
  *
  * We override ::render() so that we can add our own content above the table.
  * parent::render() is where EntityListBuilder creates the table using our
  * buildHeader() and buildRow() implementations.
  */
 public function render()
 {
     $build['description'] = array('#markup' => $this->t('Content Entity Example implements a Contacts model. These contacts are fieldable entities. You can manage the fields on the <a href="@adminlink">Contacts admin page</a>.', array('@adminlink' => $this->urlGenerator->generateFromRoute('content_entity_example.contact_settings'))));
     $build['table'] = parent::render();
     return $build;
 }
开发者ID:dropdog,项目名称:play,代码行数:13,代码来源:ContactListBuilder.php

示例12: render

 /**
  * {@inheritdoc}
  */
 public function render()
 {
     $build['accounts'] = parent::render();
     $build['accounts']['#empty'] = $this->t('No people available.');
     $build['pager']['#theme'] = 'pager';
     return $build;
 }
开发者ID:shumer,项目名称:blog,代码行数:10,代码来源:UserListBuilder.php


注:本文中的Drupal\Core\Entity\EntityListBuilder::render方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。