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


PHP ConfigEntityListBuilder::buildRow方法代码示例

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


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

示例1: buildRow

 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     $row = [];
     $row['name'] = $entity->label();
     $row['type'] = $entity->id();
     return $row + parent::buildRow($entity);
 }
开发者ID:alexburrows,项目名称:cream-2.x,代码行数:10,代码来源:ProductVariationTypeListBuilder.php

示例2: buildRow

 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     $row['label'] = $entity->label();
     $row['provider'] = $this->keyProviderPluginManager->getDefinition($entity->getKeyProvider())['title'];
     $row['service_default'] = $entity->getServiceDefault() ? "Yes" : "No";
     return $row + parent::buildRow($entity);
 }
开发者ID:rlhawk,项目名称:key,代码行数:10,代码来源:KeyListBuilder.php

示例3: buildRow

 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     $row['id'] = $entity->getId();
     $row['name'] = $this->getLabel($entity);
     $row['tag'] = $entity->getTag();
     return $row + parent::buildRow($entity);
 }
开发者ID:marmouset,项目名称:drupal,代码行数:10,代码来源:TaxTypeListBuilder.php

示例4: buildRow

 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     /** @var $entity SearchApiPage */
     $row['label'] = $entity->label();
     $row['path'] = \Drupal::l($entity->getPath(), Url::fromRoute('search_api_page.' . $entity->id()));
     return $row + parent::buildRow($entity);
 }
开发者ID:borisson,项目名称:search_api_page,代码行数:10,代码来源:SearchApiPageListBuilder.php

示例5: buildRow

 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     $row['label'] = $this->getLabel($entity);
     $row['id'] = $entity->id();
     $row['service_default'] = $entity->getServiceDefault() ? "Yes" : "No";
     return $row + parent::buildRow($entity);
 }
开发者ID:nerdstein,项目名称:key,代码行数:10,代码来源:KeyListBuilder.php

示例6: buildRow

 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     $row['type'] = $entity->link();
     $row['registration'] = $entity->getRegistration() ? t('Yes') : t('No');
     $row['multiple'] = $entity->getMultiple() ? t('Yes') : t('No');
     return $row + parent::buildRow($entity);
 }
开发者ID:darrylri,项目名称:protovbmwmo,代码行数:10,代码来源:ProfileTypeListBuilder.php

示例7: buildRow

 /**
  * Builds a row for an entity in the entity listing.
  *
  * @param EntityInterface $entity
  *   The entity for which to build the row.
  *
  * @return array
  *   A render array of the table row for displaying the entity.
  *
  * @see Drupal\Core\Entity\EntityListController::render()
  */
 public function buildRow(EntityInterface $entity)
 {
     $row['label'] = $entity->label();
     $row['machine_name'] = $entity->id();
     $row['floopy'] = $entity->floopy;
     return $row + parent::buildRow($entity);
 }
开发者ID:seongbae,项目名称:drumo-distribution,代码行数:18,代码来源:RobotListBuilder.php

示例8: buildRow

 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     $row['label'] = $this->getLabel($entity);
     $row['id'] = $entity->id();
     $row['key'] = $entity->getEncryptionKey();
     return $row + parent::buildRow($entity);
 }
开发者ID:juanramonperez,项目名称:encrypt,代码行数:10,代码来源:EncryptionProfileListBuilder.php

示例9: buildRow

 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     $row['label'] = $this->getLabel($entity);
     $row['id'] = $entity->id();
     // You probably want a few more properties here...
     return $row + parent::buildRow($entity);
 }
开发者ID:sepal,项目名称:particle_cloud,代码行数:10,代码来源:DeviceListBuilder.php

示例10: buildRow

 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity) {
   /** @var \Drupal\linkit\ProfileInterface $linkitProfile */
   $linkitProfile = $entity;
   $row['label'] = $linkitProfile->label();
   $row['description']['data'] = ['#markup' => $linkitProfile->getDescription()];
   return $row + parent::buildRow($entity);
 }
开发者ID:eloiv,项目名称:botafoc.cat,代码行数:10,代码来源:ProfileListBuilder.php

示例11: buildRow

 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     global $base_url;
     $block_url = Url::fromRoute('block.admin_display');
     $page_url = Url::fromUri($base_url . '/' . $entity->settings['path']);
     $modes = NULL;
     $mc_lists = mailchimp_get_lists();
     switch ($entity->mode) {
         case MAILCHIMP_SIGNUP_BLOCK:
             $modes = \Drupal::l(t('Block'), $block_url);
             $block_only = TRUE;
             break;
         case MAILCHIMP_SIGNUP_PAGE:
             $modes = \Drupal::l(t('Page'), $page_url);
             break;
         case MAILCHIMP_SIGNUP_BOTH:
             $modes = \Drupal::l(t('Block'), $block_url) . ' and ' . \Drupal::l(t('Page'), $page_url);
             break;
     }
     $list_labels = array();
     foreach ($entity->mc_lists as $list_id) {
         if (!empty($list_id)) {
             $list_url = Url::fromUri('https://admin.mailchimp.com/lists/dashboard/overview?id=' . $mc_lists[$list_id]['web_id'], array('attributes' => array('target' => '_blank')));
             $list_labels[] = \Drupal::l($mc_lists[$list_id]['name'], $list_url);
         }
     }
     $row['label'] = $this->getLabel($entity) . ' (Machine name: ' . $entity->id() . ')';
     $row['display_modes'] = $modes;
     $row['lists'] = implode(', ', $list_labels);
     return $row + parent::buildRow($entity);
 }
开发者ID:rafavergara,项目名称:ddv8,代码行数:34,代码来源:MailchimpSignupListBuilder.php

示例12: buildRow

 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     $row = array();
     $row['title'] = array('data' => $this->getLabel($entity), 'class' => array('menu-label'));
     $row['description'] = Xss::filterAdmin($entity->description);
     return $row + parent::buildRow($entity);
 }
开发者ID:jasonruyle,项目名称:crm_core,代码行数:10,代码来源:ContactTypeListBuilder.php

示例13: buildRow

 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     /** @var \Drupal\commerce_tax\Entity\TaxTypeInterface $entity */
     $row['name'] = $entity->label();
     $row['tag'] = $entity->getTag();
     return $row + parent::buildRow($entity);
 }
开发者ID:alexburrows,项目名称:cream-2.x,代码行数:10,代码来源:TaxTypeListBuilder.php

示例14: buildRow

  /**
   * {@inheritdoc}
   */
  public function buildRow(EntityInterface $entity) {
    $row['label'] = $this->getLabel($entity);
    $row['id'] = $entity->id();
    // You probably want a few more properties here...
    $row += parent::buildRow($entity);
    $url = Url::fromRoute(
      'block.admin_display',
      array(),
      ['query' => ['block_visibility_group' => $row['id']]]
    );
    /*$row['manage_blocks'] = array(
    '#type' => 'link',
    '#title' => 'Manage Blocks',
    // @todo Why does this crash?
    '#url' => $url,

    ); */
    $row['operations']['data']['#links']['manage_blocks'] = [
      'title' => $this->t('Manage Blocks'),
      'weight' => 80,
      'url' => $url,
    ];
    uasort($row['operations']['data']['#links'], '\Drupal\Component\Utility\SortArray::sortByWeightElement');
    return $row;
  }
开发者ID:eloiv,项目名称:botafoc.cat,代码行数:28,代码来源:BlockVisibilityGroupListBuilder.php

示例15: buildRow

 /**
  * {@inheritdoc}
  */
 public function buildRow(Schedule $entity)
 {
     $row['label'] = $entity->label();
     $row['enabled'] = $entity->get('enabled') ? $this->t('Yes') : $this->t('No');
     $row['period'] = $entity->getPeriodFormatted();
     $row['last_run'] = $this->t('Never');
     if ($last_run = $entity->getLastRun()) {
         $row['last_run'] = \Drupal::service('date.formatter')->format($last_run, 'small');
         $row['last_run'] .= ' (' . $this->t('@time ago', array('@time' => \Drupal::service('date.formatter')->formatInterval(REQUEST_TIME - $last_run))) . ')';
     }
     $row['next_run'] = $this->t('Not Scheduled');
     if ($next_run = $entity->getNextRun()) {
         $interval = \Drupal::service('date.formatter')->formatInterval(abs($next_run - REQUEST_TIME));
         if ($next_run > REQUEST_TIME) {
             $row['next_run'] = \Drupal::service('date.formatter')->format($next_run, 'small');
             $row['next_run'] .= ' (' . $this->t('in @time', array('@time' => $interval)) . ')';
         } else {
             $row['next_run'] = $this->t('Next cron run');
             if ($last_run) {
                 $row['next_run'] .= ' (' . $this->t('was due @time ago', array('@time' => $interval)) . ')';
             }
         }
     }
     $row['keep'] = \Drupal::translation()->formatPlural($entity->get('keep'), 'Last 1 backup', 'Last @count backups');
     return $row + parent::buildRow($entity);
 }
开发者ID:sojo,项目名称:d8_friendsofsilence,代码行数:29,代码来源:ScheduleListBuilder.php


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