class PictureMappingListController

Provides a listing of Pictures.

Hierarchy

Expanded class hierarchy of PictureMappingListController

File

drupal/core/modules/picture/lib/Drupal/picture/PictureMappingListController.php, line 16
Contains Drupal\picture\PictureListController.

Namespace

Drupal\picture
View source
class PictureMappingListController extends ConfigEntityListController {

  /**
   * Overrides Drupal\config\EntityListControllerBase::hookMenu().
   */
  public function hookMenu() {
    $path = $this->entityInfo['list path'];
    $items = parent::hookMenu();

    // Override the access callback.
    $items[$path]['title'] = 'Picture Mappings';
    $items[$path]['description'] = 'Manage list of picture mappings.';
    $items[$path]['access callback'] = 'user_access';
    $items[$path]['access arguments'] = array(
      'administer pictures',
    );
    return $items;
  }

  /**
   * Overrides Drupal\config\ConfigEntityListController::getOperations();
   */
  public function getOperations(EntityInterface $entity) {
    $operations = parent::getOperations($entity);
    $uri = $entity
      ->uri();
    $operations['duplicate'] = array(
      'title' => t('Duplicate'),
      'href' => $uri['path'] . '/duplicate',
      'options' => $uri['options'],
      'weight' => 15,
    );
    return $operations;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ConfigEntityListController::load public function Overrides Drupal\Core\Entity\EntityListController::load(). Overrides EntityListController::load 3
EntityListController::$entityInfo protected property The entity info array.
EntityListController::$entityType protected property The entity type name.
EntityListController::$moduleHandler protected property The module handler to invoke hooks on.
EntityListController::$storage protected property The entity storage controller class.
EntityListController::buildHeader public function Builds the header row for the entity listing. 8
EntityListController::buildOperations public function Builds a renderable list of operation links for the entity. 1
EntityListController::buildRow public function Builds a row for an entity in the entity listing. 8
EntityListController::createInstance public static function Instantiates a new instance of this entity controller. Overrides EntityControllerInterface::createInstance 1
EntityListController::getStorageController public function Implements \Drupal\Core\Entity\EntityListControllerInterface::getStorageController(). Overrides EntityListControllerInterface::getStorageController
EntityListController::render public function Implements \Drupal\Core\Entity\EntityListControllerInterface::render(). Overrides EntityListControllerInterface::render 6
EntityListController::__construct public function Constructs a new EntityListController object. 1
PictureMappingListController::getOperations public function Overrides Drupal\config\ConfigEntityListController::getOperations(); Overrides ConfigEntityListController::getOperations
PictureMappingListController::hookMenu public function Overrides Drupal\config\EntityListControllerBase::hookMenu().