buildPermissionsYaml example

protected function getYamlDiscovery() {
    if (!isset($this->yamlDiscovery)) {
      $this->yamlDiscovery = new YamlDiscovery('permissions', $this->moduleHandler->getModuleDirectories());
    }
    return $this->yamlDiscovery;
  }

  /** * {@inheritdoc} */
  public function getPermissions() {
    $all_permissions = $this->buildPermissionsYaml();

    return $this->sortPermissions($all_permissions);
  }

  /** * {@inheritdoc} */
  public function moduleProvidesPermissions($module_name) {
    // @TODO Static cache this information, see     // https://www.drupal.org/node/2339487     $permissions = $this->getPermissions();

    
Home | Imprint | This part of the site doesn't use cookies.