/** * {@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; }
/** * {@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; }
/** * {@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; }
/** * {@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; }
/** * {@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; }
/** * {@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; }
/** * {@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; }
/** * {@inheritdoc} */ public function render() { $build['description'] = array('#markup' => $this->t('Entity settings')); $build['table'] = parent::render(); return $build; }
/** * {@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; }
/** * {@inheritdoc} */ public function render() { $build = parent::render(); $build['table']['#empty'] = $this->t('No people available.'); return $build; }
/** * {@inheritdoc} */ public function render() { $build = parent::render(); $build['table']['#empty'] = $this->t('There are no payments yet.'); return $build; }
/** * {@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; }
/** * {@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('customslider implements a Custom Slider model. These Custom Slider are fieldable entities. You can manage the fields on the <a href="@adminlink">Custom Slider admin page</a>.', array('@adminlink' => \Drupal::urlGenerator()->generateFromRoute('customslider.customslider_settings')))); $build['table'] = parent::render(); return $build; }
/** * {@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('Magic Cards implements a Card Base model. These card bases are fieldable entities. You can manage the fields on the <a href="@adminlink">Card Bases admin page</a>.', array('@adminlink' => \Drupal::urlGenerator()->generateFromRoute('magic_cards.card_base_settings')))); $build['table'] = parent::render(); return $build; }
/** * {@inheritdoc} */ public function render() { $build['accounts'] = parent::render(); $build['accounts']['#empty'] = $this->t('No people available.'); $build['pager']['#theme'] = 'pager'; return $build; }
/** * {@inheritdoc} */ public function render() { $build = parent::render(); $build['table']['#empty'] = $this->t('There are no contacts available. Add one now.'); return $build; }
/** * {@inheritdoc} */ public function render() { $build = parent::render(); $build['table']['#empty'] = $this->t('There are no activities available.'); return $build; }