Same name in other branches
- 4.x src/QuickTabsInstanceListBuilder.php \Drupal\quicktabs\QuickTabsInstanceListBuilder
Provides a listing of quicktabs_instances.
@todo Would making this sortable help in specifying the importance of a quicktabs instance?
Hierarchy
- class \Drupal\quicktabs\QuickTabsInstanceListBuilder extends \Drupal\Core\Entity\EntityListBuilder
Expanded class hierarchy of QuickTabsInstanceListBuilder
Fichier
-
src/
QuickTabsInstanceListBuilder.php, line 13
Namespace
Drupal\quicktabsView source
class QuickTabsInstanceListBuilder extends EntityListBuilder {
/**
* {@inheritdoc}
*/
public function buildRow(EntityInterface $entity) {
$row['label'] = $entity->label();
$row['storage'] = $this->t('Normal');
return $row + parent::buildRow($entity);
}
/**
* {@inheritdoc}
*/
public function buildHeader() {
$header['label'] = $this->t('Name');
$header['storage'] = $this->t('Storage');
return $header + parent::buildHeader();
}
/**
* {@inheritdoc}
*/
public function getDefaultOperations(EntityInterface $entity) {
$operations = parent::getDefaultOperations($entity);
if ($entity->hasLinkTemplate('edit')) {
$operations['edit'] = [
'title' => $this->t('Edit Quick Tab'),
'weight' => 10,
'url' => $entity->toUrl('edit'),
];
$operations['delete'] = [
'title' => $this->t('Delete Quick Tab'),
'weight' => 20,
'url' => $entity->toUrl('delete'),
];
$operations['duplicate'] = [
'title' => $this->t('Duplicate Quick Tab'),
'weight' => 40,
'url' => $entity->toUrl('duplicate'),
];
}
return $operations;
}
}
Members
Titre Trier par ordre décroissant | Modifiers | Object type | Résumé |
---|---|---|---|
QuickTabsInstanceListBuilder::buildHeader | public | function | |
QuickTabsInstanceListBuilder::buildRow | public | function | |
QuickTabsInstanceListBuilder::getDefaultOperations | public | function |