コード例 #1
0
ファイル: KeyListBuilder.php プロジェクト: nerdstein/key
 /**
  * {@inheritdoc}
  */
 public function render()
 {
     $entities = $this->load();
     $build = parent::render();
     $build['table']['#empty'] = t('No keys are available. <a href="@link">Add a key</a>.', array('@link' => \Drupal::url('entity.key.add_form')));
     return $build;
 }
コード例 #2
0
 /**
  * {@inheritdoc}
  */
 public function render() {
   $build = parent::render();
   $build['#empty'] = $this->t('There are currently no blocktabs. <a href=":url">Add a new one</a>.', array(
     ':url' => $this->urlGenerator->generateFromRoute('blocktabs.add'),
   ));
   return $build;
 }
コード例 #3
0
ファイル: DraggableListBuilder.php プロジェクト: 318io/318-io
 /**
  * {@inheritdoc}
  */
 public function render()
 {
     if (!empty($this->weightKey)) {
         return $this->formBuilder()->getForm($this);
     }
     return parent::render();
 }
コード例 #4
0
 /**
  * Adds some descriptive text to our entity list.
  *
  * @return array
  *   Renderable array.
  */
 public function render()
 {
     $build['description'] = array('#markup' => $this->t("<p>This is a list of the countries currently" . " defined for use on your Drupal site. This country data adheres to" . " the @iso standard for country and zone naming used by payment" . " providers and package couriers.</p>" . "<p>To make a country available for use at checkout or in a user's" . " address book, 'Enable' the country using the widget in the" . " 'Operations' for that country. You may also 'Disable' a country to" . " prevent customers from selecting that country as a billing or" . " shipping address.</p>" . "<p>You may also use the 'Edit' widget in the 'Operations' column to" . " edit a country's name or address format.</p>", ['@iso' => Link::fromTextAndUrl('ISO 3166', Url::fromUri('http://en.wikipedia.org/wiki/ISO_3166'))->toString()]));
     $build += parent::render();
     $build['table']['#empty'] = $this->t('No countries have been configured yet.');
     return $build;
 }
コード例 #5
0
 /**
  * {@inheritdoc}
  */
 public function render()
 {
     $build['description'] = array('#markup' => $this->t("<p>This is a list of the tax rates currently" . " defined on your Drupal site.</p><p>You may use the 'Add a tax rate'" . " button to add a new rate, or use the widget in the 'Operations'" . " column to edit, delete, or clone existing tax rates.</p>"));
     $build += parent::render();
     $build['table']['#empty'] = $this->t('No tax rates have been configured yet.');
     $build['table']['#tabledrag'] = array(array('action' => 'order', 'relationship' => 'sibling', 'group' => 'uc-tax-method-weight'));
     return $build;
 }
コード例 #6
0
 /**
  * {@inheritdoc}
  */
 public function render($target_entity_type_id = NULL, $target_bundle = NULL)
 {
     $this->targetEntityTypeId = $target_entity_type_id;
     $this->targetBundle = $target_bundle;
     $build = parent::render();
     $build['table']['#attributes']['id'] = 'field-overview';
     $build['table']['#empty'] = $this->t('No fields are present yet.');
     return $build;
 }
コード例 #7
0
 /**
  * {@inheritdoc}
  */
 public function render()
 {
     $build = parent::render();
     // Get the definition of the referring entity.
     $bundle_of_definition = $this->getBundleOfDefinition();
     // Override the empty text.
     $build['table']['#empty'] = $this->t('There are no @label types yet.', ['@label' => $bundle_of_definition->getLabel()]);
     return $build;
 }
コード例 #8
0
 /**
  * {@inheritdoc}
  */
 public function render()
 {
     $build = parent::render();
     $filter = $this->getFilterLabels();
     usort($build['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']['#attributes']['class'][] = 'config-translation-entity-list';
     $build['#attached']['library'][] = 'system/drupal.system.modules';
     return $build;
 }
コード例 #9
0
 /**
  * {@inheritdoc}
  */
 public function render()
 {
     $build = parent::render();
     /**
      * Allow modules to insert their own top_action links to the list, like cleanup module.
      *
      * This is not done anymore via the workflow hook.
      * Instead, for an example:
      *   @see workflow_ui.links.action.yml
      *   @see workflow.api.php under 'hook_workflow_operations'.
      */
     // $top_actions = \Drupal::moduleHandler()
     //   ->invokeAll('workflow_operations', array('top_actions', NULL));
     // $top_actions_args = array(
     //   'links' => $top_actions,
     //   'attributes' => array('class' => array('inline', 'action-links')),
     // );
     return $build;
 }
 /**
  * {@inheritdoc}
  */
 public function render()
 {
     $build = parent::render();
     $build['table']['#attached']['library'][] = 'payment/payment_method_configuration.list';
     $build['table']['#attributes']['class'][] = 'payment-method-configuration-list';
     $build['table']['#empty'] = $this->t('There is no payment method configuration yet.');
     return $build;
 }
コード例 #11
0
 /**
  * {@inheritdoc}
  */
 public function render()
 {
     $build = parent::render();
     $build['table']['#empty'] = $this->t('No content types available. <a href="@link">Add content type</a>.', ['@link' => Url::fromRoute('node.type_add')->toString()]);
     return $build;
 }
コード例 #12
0
 /**
  * {@inheritdoc}
  */
 public function render()
 {
     $build = parent::render();
     $build['#empty'] = $this->t('There are currently no styles. <a href="!url">Add a new one</a>.', array('!url' => $this->urlGenerator->generateFromPath('admin/config/media/image-styles/add')));
     return $build;
 }
コード例 #13
0
 /**
  * {@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'] = ['#markup' => $this->t('These rules components are config entities. Add more text here.')];
     $build['table'] = parent::render();
     return $build;
 }
コード例 #14
0
 /**
  * {@inheritdoc}
  */
 public function render()
 {
     $build = parent::render();
     $build['table']['#empty'] = t('No bundles available. !link.', array('!link' => \Drupal::l('Add new bundle', new Url('eck.entity.' . $this->entityTypeId . '.add'))));
     return $build;
 }
コード例 #15
0
 /**
  * {@inheritdoc}
  */
 public function render()
 {
     $build = parent::render();
     $build['#attached']['css'][] = drupal_get_path('module', 'menu') . '/css/menu.admin.css';
     return $build;
 }
コード例 #16
0
 /**
  * {@inheritdoc}
  */
 public function render()
 {
     $build = parent::render();
     $build['table']['#empty'] = $this->t('There are no empty page callbacks yet.');
     return $build;
 }
コード例 #17
0
 /**
  * {@inheritdoc}
  */
 public function render()
 {
     $build['description'] = array('#markup' => $this->t("<p>Language to flag mapping allows you to display" . " flags from Flags module next to your language fields or" . " language switcher links.</p><p>By default, when you enable this" . " module, most common mappings are created from configuration." . " You can view a list of mappings here. You can also use the" . " 'Operations' column to edit and delete mappings.</p>"));
     $build[] = parent::render();
     return $build;
 }
コード例 #18
0
 /**
  * {@inheritdoc}
  */
 public function render()
 {
     $build = parent::render();
     $build['table']['#empty'] = $this->t('There are currently no styles. <a href=":url">Add a new one</a>.', [':url' => Url::fromRoute('image.style_add')->toString()]);
     return $build;
 }
コード例 #19
0
 /**
  * {@inheritdoc}
  */
 public function render()
 {
     $render = parent::render();
     $render['table']['#empty'] = t('No registration types found.');
     return $render;
 }
コード例 #20
0
 /**
  * {@inheritdoc}
  */
 public function render()
 {
     $build = parent::render();
     $build['#empty'] = t('No field collections have been defined yet. To do so attach a field collection field to any entity.');
     return $build;
 }
コード例 #21
0
ファイル: ActionListBuilder.php プロジェクト: ddrozdik/dmaps
 /**
  * {@inheritdoc}
  */
 public function render()
 {
     $build['action_header']['#markup'] = '<h3>' . t('Available actions:') . '</h3>';
     $build['action_table'] = parent::render();
     if (!$this->hasConfigurableActions) {
         unset($build['action_table']['#header']['operations']);
     }
     $build['action_admin_manage_form'] = \Drupal::formBuilder()->getForm('Drupal\\action\\Form\\ActionAdminManageForm');
     return $build;
 }
コード例 #22
0
 /**
  * {@inheritdoc}
  */
 public function render()
 {
     $build = parent::render();
     $build['table']['#empty'] = $this->t('There are currently no styles. <a href=":url">Add a new one</a>.', [':url' => $this->urlGenerator->generateFromRoute('image.style_add')]);
     return $build;
 }
コード例 #23
0
 /**
  * {@inheritdoc}
  */
 public function render()
 {
     $render['list'] = parent::render();
     $render['help'] = $this->nameFormatHelp();
     return $render;
 }
コード例 #24
0
 /**
  * {@inheritdoc}
  */
 public function render()
 {
     $build = parent::render();
     $build['#empty'] = t('No media bundle available. <a href="@link">Add media bundle</a>.', array('@link' => Url::fromRoute('media.bundle_add')->toString()));
     return $build;
 }
コード例 #25
0
 /**
  * {@inheritdoc}
  */
 public function render()
 {
     $build = parent::render();
     $build['table']['#empty'] = $this->t('There are currently no pages. <a href=":url">Add a new page.</a>', [':url' => Url::fromRoute('entity.page.add_form')->toString()]);
     return $build;
 }
コード例 #26
0
 /**
  * Adds some descriptive text to our entity list.
  *
  * Typically, there's no need to override render(). You may wish to do so,
  * however, if you want to add markup before or after the table.
  *
  * @return array
  *   Renderable array.
  */
 public function render()
 {
     $build['description'] = array('#markup' => $this->t("<p>The Config Entity Example module defines a" . " Robot entity type. This is a list of the Robot entities currently" . " in your Drupal site.</p><p>By default, when you enable this" . " module, one entity is created from configuration. This is why we" . " call them Config Entities. Marvin, the paranoid android, is created" . " in the database when the module is enabled.</p><p>You can view a" . " list of Robots here. You can also use the 'Operations' column to" . " edit and delete Robots.</p>"));
     $build[] = parent::render();
     return $build;
 }
コード例 #27
0
 /**
  * {@inheritdoc}
  */
 public function render()
 {
     $build['header'] = array('#markup' => '<p>' . t("To view a summary of the default meta tags and the inheritance, click on a meta tag type. If you need to set metatags for a specific entity, edit it's bundle and add the Metatag field.") . '</p>');
     return $build + parent::render();
 }
コード例 #28
0
ファイル: MenuListBuilder.php プロジェクト: aWEBoLabs/taxi
 /**
  * {@inheritdoc}
  */
 public function render()
 {
     $build = parent::render();
     $build['#attached']['library'][] = "menu_ui/drupal.menu_ui.adminforms";
     return $build;
 }
コード例 #29
0
 /**
  * {@inheritdoc}
  */
 public function render()
 {
     $build = parent::render();
     $build['#empty'] = $this->t('There are no flowers available.');
     return $build;
 }
コード例 #30
0
 /**
  * {@inheritdoc}
  */
 public function render()
 {
     xmlsitemap_check_status();
     return parent::render();
 }