PHP 클래스 RainLab\Blog\Models\Category

상속: extends Mode\Model, use trait October\Rain\Database\Traits\Validation, use trait October\Rain\Database\Traits\NestedTree
파일 보기 프로젝트 열기: rainlab/blog-plugin 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$belongsToMany
$implement
$rules * Validation
$table
$translatable Attributes that support translation, if available.

보호된 프로퍼티들

프로퍼티 타입 설명
$guarded

공개 메소드들

메소드 설명
afterDelete ( )
beforeValidate ( )
getMenuTypeInfo ( string $type ) : array Handler for the pages.menuitem.getTypeInfo event.
getPostCountAttribute ( )
resolveMenuItem ( RainLab\Pages\Classes\MenuItem $item, string $url, Cms\Classes\Theme $theme ) : mixed Handler for the pages.menuitem.resolveItem event.
setUrl ( string $pageName, Cms\Classes\Controller $controller ) Sets the "url" attribute with a URL to this object

보호된 메소드들

메소드 설명
getCategoryPageUrl ( $pageCode, $category, $theme ) Returns URL of a category page.
listSubCategoryOptions ( )

메소드 상세

afterDelete() 공개 메소드

public afterDelete ( )

beforeValidate() 공개 메소드

public beforeValidate ( )

getCategoryPageUrl() 보호된 정적인 메소드

Returns URL of a category page.
protected static getCategoryPageUrl ( $pageCode, $category, $theme )

getMenuTypeInfo() 공개 정적인 메소드

Returns a menu item type information. The type information is returned as array with the following elements: - references - a list of the item type reference options. The options are returned in the ["key"] => "title" format for options that don't have sub-options, and in the format ["key"] => ["title"=>"Option title", "items"=>[...]] for options that have sub-options. Optional, required only if the menu item type requires references. - nesting - Boolean value indicating whether the item type supports nested items. Optional, false if omitted. - dynamicItems - Boolean value indicating whether the item type could generate new menu items. Optional, false if omitted. - cmsPages - a list of CMS pages (objects of the Cms\Classes\Page class), if the item type requires a CMS page reference to resolve the item URL.
public static getMenuTypeInfo ( string $type ) : array
$type string Specifies the menu item type
리턴 array Returns an array

getPostCountAttribute() 공개 메소드

listSubCategoryOptions() 보호된 정적인 메소드

protected static listSubCategoryOptions ( )

resolveMenuItem() 공개 정적인 메소드

Returns information about a menu item. The result is an array with the following keys: - url - the menu item URL. Not required for menu item types that return all available records. The URL should be returned relative to the website root and include the subdirectory, if any. Use the URL::to() helper to generate the URLs. - isActive - determines whether the menu item is active. Not required for menu item types that return all available records. - items - an array of arrays with the same keys (url, isActive, items) + the title key. The items array should be added only if the $item's $nesting property value is TRUE.
public static resolveMenuItem ( RainLab\Pages\Classes\MenuItem $item, string $url, Cms\Classes\Theme $theme ) : mixed
$item RainLab\Pages\Classes\MenuItem Specifies the menu item.
$url string Specifies the current page URL, normalized, in lower case The URL is specified relative to the website root, it includes the subdirectory name, if any.
$theme Cms\Classes\Theme Specifies the current theme.
리턴 mixed Returns an array. Returns null if the item cannot be resolved.

setUrl() 공개 메소드

Sets the "url" attribute with a URL to this object
public setUrl ( string $pageName, Cms\Classes\Controller $controller )
$pageName string
$controller Cms\Classes\Controller

프로퍼티 상세

$belongsToMany 공개적으로 프로퍼티

public $belongsToMany

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

protected $guarded

$implement 공개적으로 프로퍼티

public $implement

$rules 공개적으로 프로퍼티

* Validation
public $rules

$table 공개적으로 프로퍼티

public $table

$translatable 공개적으로 프로퍼티

Attributes that support translation, if available.
public $translatable