public function DynamicLayoutListBuilder::getDefaultOperations in Dynamic Layouts 8
Gets this list's default operations.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The entity the operations are for.
Return value
array The array structure is identical to the return value of self::getOperations().
Overrides EntityListBuilder::getDefaultOperations
File
- src/
DynamicLayoutListBuilder.php, line 101  
Class
- DynamicLayoutListBuilder
 - Defines a class to build a listing of user Dynamic Layouts.
 
Namespace
Drupal\dynamic_layoutsCode
public function getDefaultOperations(EntityInterface $entity) {
  $operations = parent::getDefaultOperations($entity);
  if ($entity
    ->hasLinkTemplate('edit-form')) {
    $operations['edit'] = array(
      'title' => t('Edit layout'),
      'weight' => 20,
      'url' => $entity
        ->toUrl('edit-form'),
    );
  }
  return $operations;
}