NoType.php
Same filename in other branches
Namespace
Drupal\action_test\Plugin\ActionFile
-
core/
modules/ system/ tests/ modules/ action_test/ src/ Plugin/ Action/ NoType.php
View source
<?php
namespace Drupal\action_test\Plugin\Action;
use Drupal\Core\Access\AccessResult;
use Drupal\Core\Action\ActionBase;
use Drupal\Core\Action\Attribute\Action;
use Drupal\Core\Session\AccountInterface;
use Drupal\Core\StringTranslation\TranslatableMarkup;
/**
* Provides an operation with no type specified.
*/
class NoType extends ActionBase {
/**
* {@inheritdoc}
*/
public function execute($entity = NULL) {
}
/**
* {@inheritdoc}
*/
public function access($object, ?AccountInterface $account = NULL, $return_as_object = FALSE) {
$result = AccessResult::allowed();
return $return_as_object ? $result : $result->isAllowed();
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
NoType | Provides an operation with no type specified. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.