PHP Класс Backend\Core\Engine\Meta

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$URL Url The URL-instance
$baseFieldName string The name of the field we should use to generate default-values
$callback array The callback method
$custom boolean Do we need meta custom
$data array The data, when a existing meta-record is loaded
$frm Form The form instance
$id integer The id, when an existing meta-record is loaded

Открытые методы

Метод Описание
__construct ( Form $form, integer $metaId = null, string $baseFieldName = 'title', boolean $custom = false )
generateURL ( string $url ) : string Generate an url, using the predefined callback.
getData ( ) : array
getDescription ( ) : mixed Get the current value for the meta-description;
getDescriptionOverwrite ( ) : null | boolean Should the description overwrite the default
getId ( ) : null | integer Get the current value for the metaId;
getKeywords ( ) : mixed Get the current value for the meta-keywords;
getKeywordsOverwrite ( ) : null | boolean Should the keywords overwrite the default
getMetaEntity ( ) : Meta
getTitle ( ) : mixed Get the current value for the page title;
getTitleOverwrite ( ) : null | boolean Should the title overwrite the default
getURL ( ) : null | string Return the current value for an URL
getURLOverwrite ( ) : null | boolean Should the URL overwrite the default
save ( boolean $update = false ) : integer Saves the meta object
setURLCallback ( string $className, string $methodName, array $parameters = [] ) Set the callback to calculate an unique URL REMARK: this method has to be public and static REMARK: if you specify arguments they will be appended
validate ( ) Validates the form It checks if there is a value when a checkbox is checked

Защищенные методы

Метод Описание
loadForm ( ) Add all element into the form
loadMeta ( integer $id ) Load a specific meta-record

Описание методов

__construct() публичный Метод

public __construct ( Form $form, integer $metaId = null, string $baseFieldName = 'title', boolean $custom = false )
$form Form An instance of Form, the elements will be parsed in here.
$metaId integer The metaID to load.
$baseFieldName string The field where the URL should be based on.
$custom boolean Add/show custom-meta.

generateURL() публичный Метод

Generate an url, using the predefined callback.
Устаревший: use the generateUrl method on the meta repository
public generateURL ( string $url ) : string
$url string The base-url to start from.
Результат string

getData() публичный Метод

public getData ( ) : array
Результат array

getDescription() публичный Метод

Get the current value for the meta-description;
public getDescription ( ) : mixed
Результат mixed

getDescriptionOverwrite() публичный Метод

Should the description overwrite the default
public getDescriptionOverwrite ( ) : null | boolean
Результат null | boolean

getId() публичный Метод

Get the current value for the metaId;
public getId ( ) : null | integer
Результат null | integer

getKeywords() публичный Метод

Get the current value for the meta-keywords;
public getKeywords ( ) : mixed
Результат mixed

getKeywordsOverwrite() публичный Метод

Should the keywords overwrite the default
public getKeywordsOverwrite ( ) : null | boolean
Результат null | boolean

getMetaEntity() публичный Метод

public getMetaEntity ( ) : Meta
Результат Common\Doctrine\Entity\Meta

getTitle() публичный Метод

Get the current value for the page title;
public getTitle ( ) : mixed
Результат mixed

getTitleOverwrite() публичный Метод

Should the title overwrite the default
public getTitleOverwrite ( ) : null | boolean
Результат null | boolean

getURL() публичный Метод

Return the current value for an URL
public getURL ( ) : null | string
Результат null | string

getURLOverwrite() публичный Метод

Should the URL overwrite the default
public getURLOverwrite ( ) : null | boolean
Результат null | boolean

loadForm() защищенный Метод

Add all element into the form
protected loadForm ( )

loadMeta() защищенный Метод

Load a specific meta-record
protected loadMeta ( integer $id )
$id integer The id of the record to load.

save() публичный Метод

Saves the meta object
Устаревший: just use the entity for doctrine
public save ( boolean $update = false ) : integer
$update boolean Should we update the record or insert a new one.
Результат integer

setURLCallback() публичный Метод

Set the callback to calculate an unique URL REMARK: this method has to be public and static REMARK: if you specify arguments they will be appended
public setURLCallback ( string $className, string $methodName, array $parameters = [] )
$className string Name of the class to use.
$methodName string Name of the method to use.
$parameters array Parameters to parse, they will be passed after ours.

validate() публичный Метод

Validates the form It checks if there is a value when a checkbox is checked
public validate ( )

Описание свойств

$URL защищенное свойство

The URL-instance
protected Url,Backend\Core\Engine $URL
Результат Url

$baseFieldName защищенное свойство

The name of the field we should use to generate default-values
protected string $baseFieldName
Результат string

$callback защищенное свойство

The callback method
protected array $callback
Результат array

$custom защищенное свойство

Do we need meta custom
protected bool $custom
Результат boolean

$data защищенное свойство

The data, when a existing meta-record is loaded
protected array $data
Результат array

$frm защищенное свойство

The form instance
protected Form,Backend\Core\Engine $frm
Результат Form

$id защищенное свойство

The id, when an existing meta-record is loaded
protected int $id
Результат integer