You are here

public function PublishContentPublishEntity::hasUILocalTask in Publish Content 8

A custom route access callback for the Publish/Unpublish local task UI.

Return value

\Drupal\Core\Access\AccessResultInterface The access result.

1 string reference to 'PublishContentPublishEntity::hasUILocalTask'
publishcontent.routing.yml in ./publishcontent.routing.yml
publishcontent.routing.yml

File

src/Controller/PublishContentPublishEntity.php, line 165

Class

PublishContentPublishEntity
Toggles node status.

Namespace

Drupal\publishcontent\Controller

Code

public function hasUILocalTask() {
  return AccessResult::allowedIf(!empty($this->config) && !empty($this->config
    ->get('ui_localtask')));
}