PHP Класс Frontend\Modules\Tags\Engine\Model

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

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

Метод Описание
callFromInterface ( string $module, string $class, string $method, mixed $parameter = null ) : mixed Calls a method that has to be implemented though the tags interface
get ( string $url, string $language = null ) : array Get the tag for a given URL
getAll ( ) : array Fetch the list of all tags, ordered by their occurrence
getForItem ( string $module, integer $otherId ) : array Get tags for an item
getForMultipleItems ( string $module, array $otherIds ) : array Get tags for multiple items.
getIdByURL ( string $url ) : integer Get the tag-id for a given URL
getModulesForTag ( integer $id ) : array Get the modules that used a tag.
getName ( integer $id ) : string Fetch a specific tag name
getRelatedItemsByTags ( integer $id, integer $module, integer $otherModule, integer $limit = 5 ) : array Get all related items

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

callFromInterface() публичный статический Метод

Calls a method that has to be implemented though the tags interface
public static callFromInterface ( string $module, string $class, string $method, mixed $parameter = null ) : mixed
$module string The module wherein to search.
$class string The class that should contain the method.
$method string The method to call.
$parameter mixed The parameters to pass.
Результат mixed

get() публичный статический Метод

Get the tag for a given URL
public static get ( string $url, string $language = null ) : array
$url string The URL to get the tag for.
$language string
Результат array

getAll() публичный статический Метод

Fetch the list of all tags, ordered by their occurrence
public static getAll ( ) : array
Результат array

getForItem() публичный статический Метод

Get tags for an item
public static getForItem ( string $module, integer $otherId ) : array
$module string The module wherein the otherId occurs.
$otherId integer The id of the item.
Результат array

getForMultipleItems() публичный статический Метод

Get tags for multiple items.
public static getForMultipleItems ( string $module, array $otherIds ) : array
$module string The module wherefore you want to retrieve the tags.
$otherIds array The ids for the items.
Результат array

getIdByURL() публичный статический Метод

Get the tag-id for a given URL
public static getIdByURL ( string $url ) : integer
$url string The URL to get the id for.
Результат integer

getModulesForTag() публичный статический Метод

Get the modules that used a tag.
public static getModulesForTag ( integer $id ) : array
$id integer The id of the tag.
Результат array

getName() публичный статический Метод

Fetch a specific tag name
public static getName ( integer $id ) : string
$id integer The id of the tag to grab the name for.
Результат string

getRelatedItemsByTags() публичный статический Метод

Get all related items
public static getRelatedItemsByTags ( integer $id, integer $module, integer $otherModule, integer $limit = 5 ) : array
$id integer The id of the item in the source-module.
$module integer The source module.
$otherModule integer The module wherein the related items should appear.
$limit integer The maximum of related items to grab.
Результат array