PHP 트레잇 Bolt\Storage\Entity\ContentRouteTrait

This is a breakout of the old Bolt\Content class and serves two main purposes: * Maintain backward compatibility for Bolt\Content through the remainder of the 2.x development/release life-cycle * Attempt to break up former functionality into sections of code that more resembles Single Responsibility Principles These traits should be considered transitional, the functionality in the process of refactor, and not representative of a valid approach.
저자: Gawain Lynch ([email protected])
파일 보기 프로젝트 열기: bolt/bolt

공개 메소드들

메소드 설명
editlink ( ) : string Creates a link to EDIT this record, if the user is logged in.
getRouteNameAndParams ( ) : array | null Returns [route name, route params] for url generation, or null for various reasons.
isHome ( ) : boolean Checks if the current record is set as the homepage.
link ( integer $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH ) : string | null Creates a URL for the content record.

보호된 메소드들

메소드 설명
getReference ( ) : string Get the reference to this record, to uniquely identify this specific record.
getRouteConfig ( ) : array | null Retrieves the first route applicable to the content as a two-element array consisting of the binding and the route array. Returns null if there is no applicable route.
getRouteRequirementParams ( array $route ) : array Build a ContentType's route parameters
isApplicableRoute ( array $route ) : boolean Check if a route is applicable to this record.

비공개 메소드들

메소드 설명
getLinkSlug ( ) : string | integer Get a record's slug depending on the type of object used.

메소드 상세

getReference() 보호된 메소드

Get the reference to this record, to uniquely identify this specific record.
protected getReference ( ) : string
리턴 string

getRouteConfig() 보호된 메소드

Retrieves the first route applicable to the content as a two-element array consisting of the binding and the route array. Returns null if there is no applicable route.
protected getRouteConfig ( ) : array | null
리턴 array | null

getRouteNameAndParams() 공개 메소드

Returns [route name, route params] for url generation, or null for various reasons.
public getRouteNameAndParams ( ) : array | null
리턴 array | null

getRouteRequirementParams() 보호된 메소드

Build a ContentType's route parameters
protected getRouteRequirementParams ( array $route ) : array
$route array
리턴 array

isApplicableRoute() 보호된 메소드

Check if a route is applicable to this record.
protected isApplicableRoute ( array $route ) : boolean
$route array
리턴 boolean

isHome() 공개 메소드

Checks if the current record is set as the homepage.
public isHome ( ) : boolean
리턴 boolean