/**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     $row = [];
     $row['name'] = $entity->label();
     $row['type'] = $entity->id();
     return $row + parent::buildRow($entity);
 }
Example #2
0
 /**
  * {@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);
 }
Example #3
0
 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     $row['id'] = $entity->getId();
     $row['name'] = $this->getLabel($entity);
     $row['tag'] = $entity->getTag();
     return $row + parent::buildRow($entity);
 }
 /**
  * {@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);
 }
Example #5
0
 /**
  * {@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);
 }
 /**
  * {@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);
 }
 /**
  * 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);
 }
 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     $row['label'] = $this->getLabel($entity);
     $row['id'] = $entity->id();
     $row['key'] = $entity->getEncryptionKey();
     return $row + parent::buildRow($entity);
 }
 /**
  * {@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);
 }
Example #10
0
 /**
  * {@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);
 }
 /**
  * {@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);
 }
 /**
  * {@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);
 }
 /**
  * {@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);
 }
  /**
   * {@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;
  }
 /**
  * {@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);
 }
Example #16
0
 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     $row['id'] = $entity->getId();
     $row['name'] = $this->getLabel($entity);
     $row['display_name'] = $entity->getDisplayName();
     return $row + parent::buildRow($entity);
 }
 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     $row['label'] = $this->getLabel($entity);
     $row['machine_name'] = $entity->id();
     $row['protection_mode'] = $entity->mode == FormInterface::MOLLOM_MODE_ANALYSIS ? t('Textual analysis') : 'CAPTCHA only';
     return $row + parent::buildRow($entity);
 }
 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     $row['label'] = $this->getLabel($entity);
     $row['id'] = $entity->id();
     $row['themes'] = implode(', ', $entity->get('themes'));
     return $row + parent::buildRow($entity);
 }
Example #19
0
 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     $row['year'] = $entity->id();
     $row['start_date'] = $entity->start_date;
     $row['end_date'] = $entity->end_date;
     return $row + parent::buildRow($entity);
 }
Example #20
0
 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     $row['label'] = $this->getLabel($entity);
     $redirect = $entity->getRedirect();
     $row['redirect'] = empty($redirect) ? $this->t('None') : $redirect;
     return $row += parent::buildRow($entity);
 }
 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     $row['label'] = $this->l($this->getLabel($entity), new Url('entity.question.add_form', array('question_type' => $entity->id(), 'quiz' => $this->getQuizId())));
     $row['id'] = $entity->id();
     // You probably want a few more properties here...
     return $row + parent::buildRow($entity);
 }
 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $medium_editor)
 {
     $row['label'] = $medium_editor->label();
     $row['description'] = String::checkPlain($medium_editor->get('description'));
     $row['toolbar'] = String::checkPlain(implode(', ', $medium_editor->getToolbar()));
     $row['delay'] = String::checkPlain($medium_editor->get('delay'));
     return $row + parent::buildRow($medium_editor);
 }
 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     // Label
     $row['label'] = $this->getLabel($entity);
     // url
     $row['url'] = $entity->brandURL;
     return $row + parent::buildRow($entity);
 }
 /**
  * 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['description'] = $entity->get('description');
     $row['source_type'] = $entity->get('source_type');
     return $row + parent::buildRow($entity);
 }
Example #25
0
 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     /** @var \Drupal\page_manager\PageInterface $entity */
     $row['label'] = $entity->label();
     $row['id'] = $entity->id();
     $row['path'] = $this->getPath($entity);
     return $row + parent::buildRow($entity);
 }
Example #26
0
 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     /** @var \Drupal\facets\FacetInterface $entity */
     $row = parent::buildRow($entity);
     $status_label = $entity->status() ? $this->t('Enabled') : $this->t('Disabled');
     $status_icon = array('#theme' => 'image', '#uri' => $entity->status() ? 'core/misc/icons/73b355/check.svg' : 'core/misc/icons/e32700/error.svg', '#width' => 18, '#height' => 18, '#alt' => $status_label, '#title' => $status_label);
     return array('data' => array('type' => array('data' => 'Facet', 'class' => array('facets-type')), 'title' => array('data' => array('#type' => 'link', '#title' => $entity->getName(), '#suffix' => '<div>' . $entity->getFieldAlias() . ' - ' . $entity->getWidget() . '</div>') + $entity->toUrl('edit-form')->toRenderArray(), 'class' => array('search-api-title')), 'status' => array('data' => $status_icon, 'class' => array('checkbox')), 'operations' => $row['operations']), 'title' => $this->t('ID: @name', array('@name' => $entity->id())), 'class' => array('facet'));
 }
 /**
  * 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['id'] = $entity->id();
     $row['description'] = $entity->description;
     $row['fabric'] = $entity->fabric;
     $row['rating'] = $entity->rating;
     return $row + parent::buildRow($entity);
 }
 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     /** @var \Drupal\crm_core_match\Entity\Matcher $entity */
     $row['label'] = $entity->label();
     $row['description'] = $entity->getDescription();
     $row['plugin'] = $entity->getPluginTitle();
     return $row + parent::buildRow($entity);
 }
 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     $row['id'] = $entity->id();
     $row['key'] = $entity->key;
     $row['user_uuid'] = $entity->user_uuid;
     // You probably want a few more properties here...
     return $row + parent::buildRow($entity);
 }
 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     // Label
     $row['label'] = $this->getLabel($entity);
     // Sex
     $row['sex'] = $entity->sex;
     return $row + parent::buildRow($entity);
 }