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


PHP ConfigEntityListBuilder::getDefaultOperations方法代码示例

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


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

示例1: getDefaultOperations

  /**
   * {@inheritdoc}
   */
  public function getDefaultOperations(EntityInterface $entity) {
    $operations = parent::getDefaultOperations($entity);

    if (isset($operations['edit'])) {
      $operations['edit']['title'] = t('Edit profile');
    }

    $operations['matchers'] = [
      'title' => t('Manage matchers'),
      'weight' => 10,
      'url' => Url::fromRoute('linkit.matchers', [
        'linkit_profile' => $entity->id()
      ]),
    ];

    $operations['attributes'] = [
      'title' => t('Manage attributes'),
      'weight' => 20,
      'url' => Url::fromRoute('linkit.attributes', [
        'linkit_profile' => $entity->id()
      ]),
    ];

    return $operations;
  }
开发者ID:eloiv,项目名称:botafoc.cat,代码行数:28,代码来源:ProfileListBuilder.php

示例2: getDefaultOperations

 /**
  * {@inheritdoc}
  */
 public function getDefaultOperations(EntityInterface $entity)
 {
     /** @var \Drupal\commerce_tax\Entity\TaxRateInterface $entity */
     $operations = parent::getDefaultOperations($entity);
     $operations['rate_amounts'] = ['title' => $this->t('View rate amounts'), 'url' => Url::fromRoute('entity.commerce_tax_rate_amount.collection', ['commerce_tax_rate' => $entity->id()])];
     return $operations;
 }
开发者ID:alexburrows,项目名称:cream-2.x,代码行数:10,代码来源:TaxRateListBuilder.php

示例3: getDefaultOperations

 /**
  * {@inheritdoc}
  */
 public function getDefaultOperations(EntityInterface $entity)
 {
     /** @var \Drupal\Core\Config\Entity\ConfigEntityInterface $entity */
     $operations = parent::getDefaultOperations($entity);
     $operations['set_default'] = array('title' => t('Set Default'), 'weight' => -10, 'url' => $entity->urlInfo('set-default'));
     return $operations;
 }
开发者ID:badjava,项目名称:encrypt,代码行数:10,代码来源:EncryptionProfileListBuilder.php

示例4: getDefaultOperations

 /**
  * Defines the default operations.
  */
 public function getDefaultOperations(EntityInterface $entity)
 {
     $operations = parent::getDefaultOperations($entity);
     // Add an operation for adding a new entity object of this type.
     $url = new Url('mymodule.myentity.add', array('myentity_type' => $entity->id()));
     $operations['add_new'] = array('title' => $this->t('Add new My Entity'), 'weight' => 11, 'url' => $url);
     return $operations;
 }
开发者ID:Jamesadamar,项目名称:programmers_guide_to_drupal,代码行数:11,代码来源:MyEntityTypeListBuilder.php

示例5: getDefaultOperations

 /**
  * Gets this list's default operations.
  *
  * @param \Drupal\Core\Entity\EntityInterface $entity
  *   The entity the operations are for.
  *
  * @return array
  *   The array structure is identical to the return value of
  *   self::getOperations().
  */
 public function getDefaultOperations(EntityInterface $entity)
 {
     $operations = parent::getDefaultOperations($entity);
     if ($entity->access('backups') && $entity->hasLinkTemplate('backups')) {
         $operations['backups'] = array('title' => $this->t('List Backups'), 'weight' => 100, 'url' => $entity->toUrl('backups'));
     }
     return $operations;
 }
开发者ID:r-daneelolivaw,项目名称:chalk,代码行数:18,代码来源:DestinationListBuilder.php

示例6: getDefaultOperations

 /**
  * {@inheritdoc}
  */
 public function getDefaultOperations(EntityInterface $entity)
 {
     $operations = parent::getDefaultOperations($entity);
     if (isset($operations['edit'])) {
         $operations['edit']['title'] = t('Edit grade letter set');
     }
     $operations['list'] = array('title' => t('List grade letters'), 'url' => $entity->toUrl('list-form'));
     return $operations;
 }
开发者ID:dakala,项目名称:gradebook,代码行数:12,代码来源:GradeLetterSetListBuilder.php

示例7: getDefaultOperations

 /**
  * {@inheritdoc}
  */
 public function getDefaultOperations(EntityInterface $entity)
 {
     $ops = parent::getDefaultOperations($entity);
     // Do not allow deletion of the default configuration.
     if ($entity->id() == 'default') {
         unset($ops['delete']);
     }
     return $ops;
 }
开发者ID:r-daneelolivaw,项目名称:chalk,代码行数:12,代码来源:FlexsliderListBuilder.php

示例8: getDefaultOperations

 /**
  * {@inheritdoc}
  */
 public function getDefaultOperations(EntityInterface $entity)
 {
     /** @var \Drupal\field\FieldInstanceConfigInterface $entity */
     $operations = parent::getDefaultOperations($entity);
     $operations['storage-settings'] = array('title' => $this->t('Field settings'), 'weight' => 20, 'attributes' => array('title' => $this->t('Edit field settings.'))) + $entity->urlInfo('storage-edit-form')->toArray();
     $operations['edit']['attributes']['title'] = $this->t('Edit instance settings.');
     $operations['delete']['attributes']['title'] = $this->t('Delete instance.');
     return $operations;
 }
开发者ID:anatalsceo,项目名称:en-classe,代码行数:12,代码来源:FieldInstanceConfigListBuilder.php

示例9: getDefaultOperations

 /**
  * {@inheritdoc}
  */
 public function getDefaultOperations(EntityInterface $entity)
 {
     /** @var \Drupal\field\FieldConfigInterface $entity */
     $operations = parent::getDefaultOperations($entity);
     if (isset($operations['edit'])) {
         $operations['edit']['weight'] = 30;
     }
     return $operations;
 }
开发者ID:eric-shell,项目名称:eric-shell-d8,代码行数:12,代码来源:ParagraphsTypeListBuilder.php

示例10: getDefaultOperations

 /**
  * {@inheritdoc}
  */
 public function getDefaultOperations(EntityInterface $entity)
 {
     $operations = parent::getDefaultOperations($entity);
     if (isset($operations['edit'])) {
         $operations['edit']['title'] = t('Edit shortcut set');
     }
     $operations['list'] = array('title' => t('List links'), 'url' => $entity->urlInfo('customize-form'));
     return $operations;
 }
开发者ID:aWEBoLabs,项目名称:taxi,代码行数:12,代码来源:ShortcutSetListBuilder.php

示例11: getDefaultOperations

 /**
  * {@inheritdoc}
  */
 public function getDefaultOperations(EntityInterface $entity)
 {
     $operations = parent::getDefaultOperations($entity);
     if ($entity instanceof IndexInterface) {
         $route_parameters['search_api_index'] = $entity->id();
         $operations['fields'] = array('title' => $this->t('Fields'), 'weight' => 20, 'url' => new Url('entity.search_api_index.fields', $route_parameters));
         $operations['processors'] = array('title' => $this->t('Processors'), 'weight' => 30, 'url' => new Url('entity.search_api_index.processors', $route_parameters));
     }
     return $operations;
 }
开发者ID:nB-MDSO,项目名称:mdso-d8blog,代码行数:13,代码来源:IndexListBuilder.php

示例12: getDefaultOperations

 /**
  * {@inheritdoc}
  */
 public function getDefaultOperations(EntityInterface $entity)
 {
     /** @var \Drupal\Core\Config\Entity\ConfigEntityInterface $entity */
     $operations = parent::getDefaultOperations($entity);
     $ratesRoute = Url::fromRoute('entity.commerce_tax_rate.collection', ['commerce_tax_type' => $entity->getId()]);
     $addRateRoute = Url::fromRoute('entity.commerce_tax_rate.add_form', ['commerce_tax_type' => $entity->getId()]);
     $operations['rates'] = ['title' => $this->t('View rates'), 'url' => $ratesRoute];
     $operations['add_rate'] = ['title' => $this->t('Add rate'), 'url' => $addRateRoute];
     return $operations;
 }
开发者ID:marmouset,项目名称:drupal,代码行数:13,代码来源:TaxTypeListBuilder.php

示例13: getDefaultOperations

 /**
  * {@inheritdoc}
  */
 public function getDefaultOperations(EntityInterface $entity)
 {
     $operations = parent::getDefaultOperations($entity);
     // Place the edit operation after the operations added by field_ui.module
     // which have the weights 15, 20, 25.
     if (isset($operations['edit'])) {
         $operations['edit']['weight'] = 30;
     }
     return $operations;
 }
开发者ID:davidsoloman,项目名称:drupalconsole.com,代码行数:13,代码来源:BlockContentTypeListBuilder.php

示例14: getDefaultOperations

 /**
  * {@inheritdoc}
  */
 public function getDefaultOperations(EntityInterface $entity)
 {
     /** @var \Drupal\Core\Config\Entity\ConfigEntityInterface $entity */
     $operations = parent::getDefaultOperations($entity);
     $message = 'Set Default';
     if ($entity->getServiceDefault()) {
         $message = 'Unset Default';
     }
     $operations['set_default'] = array('title' => t($message), 'weight' => 10, 'url' => $entity->urlInfo('set-default'));
     return $operations;
 }
开发者ID:nerdstein,项目名称:key,代码行数:14,代码来源:KeyListBuilder.php

示例15: getDefaultOperations

 /**
  * {@inheritdoc}
  */
 public function getDefaultOperations(EntityInterface $entity)
 {
     $operations = parent::getDefaultOperations($entity);
     if ($entity->hasLinkTemplate('edit-form')) {
         $operations['edit'] = array('title' => t('Edit schedule'), 'weight' => 20, 'url' => $entity->urlInfo('edit-form'));
     }
     if ($entity->hasLinkTemplate('delete-form')) {
         $operations['delete'] = array('title' => t('Delete schedule'), 'weight' => 30, 'url' => $entity->urlInfo('delete-form'));
     }
     return $operations;
 }
开发者ID:sojo,项目名称:d8_friendsofsilence,代码行数:14,代码来源:ScheduleListBuilder.php


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