Jarves\ACL::isDeletable PHP Méthode

isDeletable() public méthode

public isDeletable ( string $objectKey, array $pk = null ) : boolean
$objectKey string
$pk array
Résultat boolean
    public function isDeletable($objectKey, $pk = null)
    {
        return $this->check(ACLRequest::create($objectKey, $pk)->onlyDeleteMode());
    }

Usage Example

Exemple #1
0
 /**
  * Each item goes through this function in getItems(). Defines whether a item is editable or deleteable.
  * You can attach here extra action icons, too.
  *
  * Result should be:
  *
  * $item['_editable'] = true|false
  * $item['_deleteable'] = true|false
  * $item['_actions'] = array(
  *         array('/* action * /') //todo
  *     )
  * )
  *
  * @param array $item
  *
  * @return array
  */
 public function prepareRow(&$item)
 {
     $item['_editable'] = $this->acl->isUpdatable($this->getObject(), $item);
     $item['_deletable'] = $this->acl->isDeletable($this->getObject(), $item);
 }