Jarves\ACL::isUpdatable PHP Метод

isUpdatable() публичный Метод

public isUpdatable ( string $objectKey, array $pk = null ) : boolean
$objectKey string
$pk array
Результат boolean
    public function isUpdatable($objectKey, $pk = null)
    {
        return $this->check(ACLRequest::create($objectKey, $pk)->onlyUpdateMode());
    }

Usage Example

Пример #1
0
 /**
  * @param int|null $nodeId
  *
  * @return bool
  */
 public function isEditMode($nodeId = null)
 {
     $request = $this->requestStack->getMasterRequest();
     $hasRequest = !!$request;
     if ($nodeId) {
         return $hasRequest && 1 === (int) $request->get('_jarves_editor') && $this->acl->isUpdatable('jarves/node', ['id' => $nodeId]);
     }
     return $hasRequest && 1 === (int) $request->get('_jarves_editor') && $this->pageStack->getCurrentPage() && $this->acl->isUpdatable('jarves/node', ['id' => $this->pageStack->getCurrentPage()->getId()]);
 }
All Usage Examples Of Jarves\ACL::isUpdatable