프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$allowedSortingOptions | array | The attributes on which the post list can be ordered | |
$attachMany | |||
$belongsTo | * Relations | ||
$belongsToMany | |||
$implement | |||
$preview | |||
$rules | * Validation | ||
$table | |||
$translatable | Attributes that support translation, if available. |
프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$appends | The accessors to append to the model's array form. | ||
$dates | array | The attributes that should be mutated to dates. |
메소드 | 설명 | |
---|---|---|
afterValidate ( ) | ||
beforeSave ( ) | ||
canEdit ( Backend\Models\User $user ) : boolean | Used to test if a certain user has permission to edit post, returns TRUE if the user is the owner or has other posts access. | |
filterFields ( $fields, $context = null ) : void | Limit visibility of the published-button | |
formatHtml ( $input, $preview = false ) | ||
getHasSummaryAttribute ( ) : boolean | Used by "has_summary", returns true if this post uses a summary (more tag) | |
getMenuTypeInfo ( string $type ) : array | Handler for the pages.menuitem.getTypeInfo event. | |
getSummaryAttribute ( ) : string | Used by "summary", if no excerpt is provided, generate one from the content. | |
resolveMenuItem ( RainLab\Pages\Classes\MenuItem $item, string $url, Cms\Classes\Theme $theme ) : mixed | Handler for the pages.menuitem.resolveItem event. | |
scopeFilterCategories ( Illuminate\Query\Builder $query, array $categories ) : Illuminate\Query\Builder | Allows filtering for specifc categories | |
scopeIsPublished ( $query ) | ||
scopeListFrontEnd ( $query, array $options ) : self | Lists posts for the front end | |
setUrl ( string $pageName, Cms\Classes\Controller $controller ) | Sets the "url" attribute with a URL to this object |
메소드 | 설명 | |
---|---|---|
getPostPageUrl ( $pageCode, $category, $theme ) | Returns URL of a post page. |
public filterFields ( $fields, $context = null ) : void | ||
리턴 | void |
public getHasSummaryAttribute ( ) : boolean | ||
리턴 | boolean |
public static getMenuTypeInfo ( string $type ) : array | ||
$type | string | Specifies the menu item type |
리턴 | array | Returns an array |
protected static getPostPageUrl ( $pageCode, $category, $theme ) |
public getSummaryAttribute ( ) : string | ||
리턴 | string |
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. |
public scopeFilterCategories ( Illuminate\Query\Builder $query, array $categories ) : Illuminate\Query\Builder | ||
$query | Illuminate\Query\Builder | QueryBuilder |
$categories | array | List of category ids |
리턴 | Illuminate\Query\Builder | QueryBuilder |
public scopeListFrontEnd ( $query, array $options ) : self | ||
$options | array | Display options |
리턴 | self |
public static array $allowedSortingOptions | ||
리턴 | array |