public function ChangeConnectionRole::access in RedHen CRM 8
File
- modules/
redhen_connection/ src/ Plugin/ Action/ ChangeConnectionRole.php, line 111
Class
- ChangeConnectionRole
- Change the role of a Redhen Connection.
Namespace
Drupal\redhen_connection\Plugin\ActionCode
public function access($object, AccountInterface $account = NULL, $return_as_object = FALSE) {
/** @var \Drupal\redhen_connection\ConnectionInterface $object */
$access = $object
->access('update', $account, TRUE);
return $return_as_object ? $access : $access
->isAllowed();
}