public function evaluate(array $parameters): bool
    {
        if (false === $this->permissionResolver->canUser('role', 'read', $parameters['content'])) {
            return false;
        }

        /** @var \eZ\Publish\API\Repository\Values\ContentType\ContentType $contentType */
        $contentType = $parameters['contentType'];

        $isUser = new ContentTypeIsUser($this->userContentTypeIdentifier);
        $isUserGroup = new ContentTypeIsUserGroup($this->userGroupContentTypeIdentifier);
        $isUserOrUserGroup = (new OrSpecification($isUser, $isUserGroup))->isSatisfiedBy($contentType);

        return $isUserOrUserGroup;
    }
public function evaluate(array $parameters): bool
    {
        if (false === $this->permissionResolver->canUser('role', 'read', $parameters['content'])) {
            return false;
        }

        /** @var \eZ\Publish\API\Repository\Values\ContentType\ContentType $contentType */
        $contentType = $parameters['contentType'];

        $isUser = new ContentTypeIsUser($this->userContentTypeIdentifier);
        $isUserGroup = new ContentTypeIsUserGroup($this->userGroupContentTypeIdentifier);
        $isUserOrUserGroup = (new OrSpecification($isUser, $isUserGroup))->isSatisfiedBy($contentType);

        return $isUserOrUserGroup;
    }
public function evaluate ( array $ parameters ) : bool { if ( false === $ this -> permissionResolver -> canUser ( 'role' , 'read' , $ parameters [ 'content' ] ) ) { return false ; } /** @var \eZ\Publish\API\Repository\Values\ContentType\ContentType $contentType */ $ contentType = $ parameters [ 'contentType' ] ; $ isUser = new ContentTypeIsUser ( $ this -> userContentTypeIdentifier ) ; $ isUserGroup = new ContentTypeIsUserGroup ( $ this -> userGroupContentTypeIdentifier ) ; $ isUserOrUserGroup = ( new OrSpecification ( $ isUser , $ isUserGroup ) ) -> isSatisfiedBy ( $ contentType ) ; return $ isUserOrUserGroup ; }
Get information about tab presence.

@param array $parameters

@return bool

@throws \eZ\Publish\API\Repository\Exceptions\BadStateException
@throws \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException
Get information about tab presence .