You are here

class PublicationDateNodePermissions in Publication Date 8

Same name and namespace in other branches
  1. 8.2 src/PublicationDateNodePermissions.php \Drupal\publication_date\PublicationDateNodePermissions

Hierarchy

Expanded class hierarchy of PublicationDateNodePermissions

File

src/PublicationDateNodePermissions.php, line 13
Contains \Drupal\publication_date\PublicationDateNodePermissions.

Namespace

Drupal\publication_date
View source
class PublicationDateNodePermissions extends NodePermissions {
  protected function buildPermissions(NodeType $type) {
    $type_id = $type
      ->id();
    $type_params = array(
      '%type_name' => $type
        ->label(),
    );
    return [
      "set {$type_id} published on date" => array(
        'title' => $this
          ->t('Modify %type_name "Published On" date.', $type_params),
        'description' => $this
          ->t('Change the "Published On" date for this content type.'),
      ),
    ];
  }

}

Members

Namesort descending Modifiers Type Description Overrides
NodePermissions::nodeTypePermissions public function Returns an array of node type permissions.
PublicationDateNodePermissions::buildPermissions protected function Returns a list of node permissions for a given node type. Overrides NodePermissions::buildPermissions
StringTranslationTrait::$stringTranslation protected property The string translation service. 1
StringTranslationTrait::formatPlural protected function Formats a string containing a count of items.
StringTranslationTrait::getNumberOfPlurals protected function Returns the number of plurals supported by a given language.
StringTranslationTrait::getStringTranslation protected function Gets the string translation service.
StringTranslationTrait::setStringTranslation public function Sets the string translation service to use. 2
StringTranslationTrait::t protected function Translates a string to the current language or to a given language.