PHP 클래스 RainLab\Pages\Classes\Menu

저자: Alexey Bobkov, Samuel Georges
상속: extends Cms\Classes\CmsObject
파일 보기 프로젝트 열기: rainlab/pages-plugin 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$allowedExtensions Allowable file extensions.
$contentDataCache Cache store used by parseContent method.
$defaultExtension Default file extension.
$dirName The container name associated with the model, eg: pages.
$fillable The attributes that are mass assignable.
$purgeable List of attribute names which are not considered "settings".

공개 메소드들

메소드 설명
beforeSave ( ) : void Triggered before the menu is saved.
beforeValidate ( ) : void Validate custom attributes.
generateReferences ( Cms\Classes\Page $page ) : array Returns the menu item references.
getCodeAttribute ( ) : string Returns the menu code.
getItemDataAttribute ( ) : array Returns a default value for itemData attribute.
getItemsAttribute ( ) : array Returns a default value for items attribute.
getNameAttribute ( ) : string Returns a default value for name attribute.
initCacheItem ( &$item ) Initializes a cache item.
setCodeAttribute ( string $code ) : Cms\Classes\CmsObject Sets the menu code.

보호된 메소드들

메소드 설명
parseContent ( ) : array | null Processes the content attribute to an array of menu data.
renderContent ( ) : string Renders the menu data as a content string in YAML format.

메소드 상세

beforeSave() 공개 메소드

Triggered before the menu is saved.
public beforeSave ( ) : void
리턴 void

beforeValidate() 공개 메소드

Validate custom attributes.
public beforeValidate ( ) : void
리턴 void

generateReferences() 공개 메소드

This function is used on the front-end.
public generateReferences ( Cms\Classes\Page $page ) : array
$page Cms\Classes\Page The current page object.
리턴 array Returns an array of the \RainLab\Pages\Classes\MenuItemReference objects.

getCodeAttribute() 공개 메소드

Returns the menu code.
public getCodeAttribute ( ) : string
리턴 string

getItemDataAttribute() 공개 메소드

Returns a default value for itemData attribute.
public getItemDataAttribute ( ) : array
리턴 array

getItemsAttribute() 공개 메소드

Items are objects of the \RainLab\Pages\Classes\MenuItem class.
public getItemsAttribute ( ) : array
리턴 array

getNameAttribute() 공개 메소드

Returns a default value for name attribute.
public getNameAttribute ( ) : string
리턴 string

initCacheItem() 공개 정적인 메소드

Initializes a cache item.
public static initCacheItem ( &$item )

parseContent() 보호된 메소드

Processes the content attribute to an array of menu data.
protected parseContent ( ) : array | null
리턴 array | null

renderContent() 보호된 메소드

Renders the menu data as a content string in YAML format.
protected renderContent ( ) : string
리턴 string

setCodeAttribute() 공개 메소드

Sets the menu code.
public setCodeAttribute ( string $code ) : Cms\Classes\CmsObject
$code string Specifies the file code.
리턴 Cms\Classes\CmsObject Returns the object instance.

프로퍼티 상세

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

Allowable file extensions.
protected $allowedExtensions

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

Cache store used by parseContent method.
protected $contentDataCache

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

Default file extension.
protected $defaultExtension

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

The container name associated with the model, eg: pages.
protected $dirName

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

The attributes that are mass assignable.
protected $fillable

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

List of attribute names which are not considered "settings".
protected $purgeable