PHP 클래스 Jarves\PageStack

파일 보기 프로젝트 열기: jarves/jarves 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$adminPrefix string
$domain Jarves\Model\Domain | null
$node Jarves\Model\Node | null
$pageResponse PageResponse

공개 메소드들

메소드 설명
__construct ( string $adminPrefix, Symfony\Component\HttpFoundation\RequestStack $requestStack, Cacher $cacher, Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface $tokenStorage )
getAdminPrefix ( ) : string
getCachedPageToUrl ( integer $domainId ) : array Returns a array map nodeId -> url
getCachedUrlToPage ( integer $domainId ) : array Returns a array map url -> nodeId
getCurrentDomain ( ) : Domain
getCurrentPage ( ) : Node | null
getCurrentUrl ( boolean $full = false ) : string
getCurrentUrlAffix ( ) : string Returns the affix relative to current page.
getDomain ( integer $domainId = null ) : Domain Returns Domain object. This tries to cache the domain, so its a faster access method than using DomainQuery classes.
getDomainOfPage ( integer $id ) : integer | null Returns the domain of the given $id page.
getNodeUrl ( Node | integer | string $nodeOrId, boolean $fullUrl = false, boolean $suppressStartNodeCheck = false ) : string
getPage ( Node | string | integer $node ) : Node | null Returns a super fast cached Page object.
getPageResponse ( ) : PageResponse | null
getRequest ( ) : null | Request Returns always the master request.
getRequestStack ( ) : Symfony\Component\HttpFoundation\RequestStack
getRouteUrl ( Node | integer $nodeOrId, boolean $suppressStartNodeCheck = false ) : string
getSession ( ) : null | Symfony\Component\HttpFoundation\Session\SessionInterface Returns the current session. if available.
getToken ( ) : null | Symfony\Component\Security\Core\Authentication\Token\TokenInterface
getUser ( ) : Symfony\Component\Security\Core\User\UserInterface | null Returns the current logged in User if available. Null if not or another token than Jarves' is active.
isAdmin ( ) : boolean When a route is loading within /jarves
isLoggedIn ( ) : boolean Returns true when a non AnonymousToken is set (which primarily means a real User is logged in)
reset ( )
setCurrentDomain ( Domain $domain )
setCurrentPage ( Node $node )
setPageResponse ( PageResponse $pageResponse )
updatePage2DomainCache ( )

메소드 상세

__construct() 공개 메소드

public __construct ( string $adminPrefix, Symfony\Component\HttpFoundation\RequestStack $requestStack, Cacher $cacher, Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface $tokenStorage )
$adminPrefix string
$requestStack Symfony\Component\HttpFoundation\RequestStack
$cacher Jarves\Cache\Cacher
$tokenStorage Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface

getAdminPrefix() 공개 메소드

public getAdminPrefix ( ) : string
리턴 string

getCachedPageToUrl() 공개 메소드

Returns a array map nodeId -> url
public getCachedPageToUrl ( integer $domainId ) : array
$domainId integer
리턴 array

getCachedUrlToPage() 공개 메소드

Returns a array map url -> nodeId
public getCachedUrlToPage ( integer $domainId ) : array
$domainId integer
리턴 array

getCurrentDomain() 공개 메소드

public getCurrentDomain ( ) : Domain
리턴 Jarves\Model\Domain

getCurrentPage() 공개 메소드

public getCurrentPage ( ) : Node | null
리턴 Jarves\Model\Node | null

getCurrentUrl() 공개 메소드

public getCurrentUrl ( boolean $full = false ) : string
$full boolean
리턴 string

getCurrentUrlAffix() 공개 메소드

If the current page is : /documentation/field, but the actual loaded route is: /documentation/field/field-name, then '/field-name' is returned. This can be the case, when a plugin added own routes and returned a result for '/field-name'.
public getCurrentUrlAffix ( ) : string
리턴 string

getDomain() 공개 메소드

Returns Domain object. This tries to cache the domain, so its a faster access method than using DomainQuery classes.
public getDomain ( integer $domainId = null ) : Domain
$domainId integer If not defined, it returns the current domain.
리턴 Jarves\Model\Domain

getDomainOfPage() 공개 메소드

Returns the domain of the given $id page.
public getDomainOfPage ( integer $id ) : integer | null
$id integer
리턴 integer | null

getNodeUrl() 공개 메소드

public getNodeUrl ( Node | integer | string $nodeOrId, boolean $fullUrl = false, boolean $suppressStartNodeCheck = false ) : string
$nodeOrId Jarves\Model\Node | integer | string
$fullUrl boolean with http://
$suppressStartNodeCheck boolean
리턴 string

getPage() 공개 메소드

Returns a super fast cached Page object.
public getPage ( Node | string | integer $node ) : Node | null
$node Jarves\Model\Node | string | integer Node model, url or node id
리턴 Jarves\Model\Node | null

getPageResponse() 공개 메소드

public getPageResponse ( ) : PageResponse | null
리턴 PageResponse | null

getRequest() 공개 메소드

Returns always the master request.
public getRequest ( ) : null | Request
리턴 null | Symfony\Component\HttpFoundation\Request

getRequestStack() 공개 메소드

public getRequestStack ( ) : Symfony\Component\HttpFoundation\RequestStack
리턴 Symfony\Component\HttpFoundation\RequestStack

getRouteUrl() 공개 메소드

public getRouteUrl ( Node | integer $nodeOrId, boolean $suppressStartNodeCheck = false ) : string
$nodeOrId Jarves\Model\Node | integer
$suppressStartNodeCheck boolean
리턴 string

getSession() 공개 메소드

Returns the current session. if available.
public getSession ( ) : null | Symfony\Component\HttpFoundation\Session\SessionInterface
리턴 null | Symfony\Component\HttpFoundation\Session\SessionInterface

getToken() 공개 메소드

public getToken ( ) : null | Symfony\Component\Security\Core\Authentication\Token\TokenInterface
리턴 null | Symfony\Component\Security\Core\Authentication\Token\TokenInterface

getUser() 공개 메소드

Returns the current logged in User if available. Null if not or another token than Jarves' is active.
public getUser ( ) : Symfony\Component\Security\Core\User\UserInterface | null
리턴 Symfony\Component\Security\Core\User\UserInterface | null

isAdmin() 공개 메소드

When a route is loading within /jarves
public isAdmin ( ) : boolean
리턴 boolean

isLoggedIn() 공개 메소드

Returns true when a non AnonymousToken is set (which primarily means a real User is logged in)
public isLoggedIn ( ) : boolean
리턴 boolean

reset() 공개 메소드

public reset ( )

setCurrentDomain() 공개 메소드

public setCurrentDomain ( Domain $domain )
$domain Jarves\Model\Domain

setCurrentPage() 공개 메소드

public setCurrentPage ( Node $node )
$node Jarves\Model\Node

setPageResponse() 공개 메소드

public setPageResponse ( PageResponse $pageResponse )
$pageResponse PageResponse

updatePage2DomainCache() 공개 메소드

프로퍼티 상세

$adminPrefix 보호되어 있는 프로퍼티

protected string $adminPrefix
리턴 string

$domain 보호되어 있는 프로퍼티

protected Domain,Jarves\Model|null $domain
리턴 Jarves\Model\Domain | null

$node 보호되어 있는 프로퍼티

protected Node,Jarves\Model|null $node
리턴 Jarves\Model\Node | null

$pageResponse 보호되어 있는 프로퍼티

protected PageResponse,jarves $pageResponse
리턴 PageResponse