本文整理汇总了PHP中Drupal\Core\Config\Entity\ConfigEntityListBuilder::render方法的典型用法代码示例。如果您正苦于以下问题:PHP ConfigEntityListBuilder::render方法的具体用法?PHP ConfigEntityListBuilder::render怎么用?PHP ConfigEntityListBuilder::render使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Drupal\Core\Config\Entity\ConfigEntityListBuilder
的用法示例。
在下文中一共展示了ConfigEntityListBuilder::render方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render
/**
* {@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: render
/**
* {@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: render
/**
* {@inheritdoc}
*/
public function render()
{
if (!empty($this->weightKey)) {
return $this->formBuilder()->getForm($this);
}
return parent::render();
}
示例4: render
/**
* 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: render
/**
* {@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: render
/**
* {@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: render
/**
* {@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: render
/**
* {@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: render
/**
* {@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;
}
示例10: render
/**
* {@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: render
/**
* {@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: render
/**
* {@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: 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'] = ['#markup' => $this->t('These rules components are config entities. Add more text here.')];
$build['table'] = parent::render();
return $build;
}
示例14: render
/**
* {@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: render
/**
* {@inheritdoc}
*/
public function render()
{
$build = parent::render();
$build['#attached']['css'][] = drupal_get_path('module', 'menu') . '/css/menu.admin.css';
return $build;
}