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.
Показать файл
Открыть проект
Открытые методы
Метод |
Описание |
|
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. |
|
Защищенные методы
Приватные методы
Описание методов
editlink()
публичный Метод
Creates a link to EDIT this record, if the user is logged in.
getReference()
защищенный Метод
Get the reference to this record, to uniquely identify this specific record.
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.
getRouteNameAndParams()
публичный Метод
Returns [route name, route params] for url generation, or null for various reasons.
getRouteRequirementParams()
защищенный Метод
Build a ContentType's route parameters
isApplicableRoute()
защищенный Метод
Check if a route is applicable to this record.
Checks if the current record is set as the homepage.
Creates a URL for the content record.