PHP Класс ArticleTypeField

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

Открытые свойства

Свойство Тип Описание
$m_columnNames
$m_dbTableName
$m_keyColumnNames

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

Метод Описание
DatabaseTypes ( $p_numericDigits = null, $p_numericPrecision = null ) : array Returns an array of valid field data types.
FetchFields ( $p_name = null, $p_articleType = null, $p_dataType = null, $p_negateName = false, $p_negateArticleType = false, $p_negateDataType = false, $p_selectHidden = true, $p_skipCache = false ) : array Returns an array of fields from all article types that match the given conditions.
SetFieldColor ( $p_article_type, $p_field_name, $p_color_value )
TypesConvertibleFrom ( $p_type )
TypesConvertibleTo ( $p_type ) : array Returns an array of types compatible with the given field type.
VerboseTypeName ( $p_typeName, $p_languageId = 1, $p_rootTopicId = null ) : string Get a human-readable representation of the column type.
__construct ( $p_articleTypeName = null, $p_fieldName = null )
create ( string $p_type = null, array $p_params = [] ) Create a column in the table.
delete ( ) Deletes the current article type field.
fetch ( array $p_recordSet = null, $p_forceExists = false ) : boolean Fetch a single record from the database for the given key.
getArticleType ( ) : string Returns the article type name.
getColor ( )
getConvertibleFromTypes ( )
getConvertibleToTypes ( )
getDefaultColor ( )
getDisplayName ( $p_lang ) : string Gets the translation for a given language; default language is the session language. If no translation is set for that language, we return the dbTableName.
getDisplayNameLanguageCode ( $p_lang ) : string Gets the language code of the current translation language; or none if there is no translation.
getFilter ( ) : boolean Returns whether articles of this type should be filtered out by default at listings.
getGenericType ( ) fn getType
getMaxSize ( ) : integer Gets the maximum size of a article type
getMetadata ( ) : array Return an associative array of the metadata in ArticleFieldMetadata.
getName ( ) : string
getNextOrder ( ) : integer Returns the highest weight + 1 or 0 for the starter
getOrders ( ) : array Get the ordering of all fields; initially, a field has a field_weight of NULL when it is created. if we discover that a field has a field weight of NULL, we give it the MAX+1 field_weight. Returns a NUMERIC array of ORDER => FIELDNAME.
getPhraseId ( ) : -1
getPrintName ( ) : string
getStatus ( ) : string Returns the is_hidden status of a field. Returns 'hidden' or 'shown'.
getTopicTypeRootElement ( ) : string
getTranslations ( ) : array Returns an array of translation strings for the field name.
getType ( ) : string
getVerboseTypeName ( $p_languageId = 1 ) fn VerboseTypeName
isContent ( ) : boolean Returns true if the current field is a content field.
isConvertibleFrom ( $p_type ) : boolean Returns true if the given type can be converted to the current field type.
isConvertibleTo ( $p_type )
isHidden ( ) : boolean Returns true if the current field is hidden.
rename ( $p_newName ) Rename the article type field.
reorder ( $move ) Reorders the current field; accepts either "up" or "down"
setColor ( $p_color )
setFilter ( $p_filter ) : boolean Sets whether articles of this type should be filtered out by default at listings.
setIsContent ( $p_isContent ) : boolean Sets the content flag. Returns true on success, false otherwise.
setName ( integer $p_languageId, string $p_value ) : boolean Set the type name for the given language. A new entry in the database will be created if the language did not exist.
setOrders ( $orderArray ) Saves the ordering of all the fields. Accepts an NUMERIC array of ORDERRANK => FIELDNAME. (see getOrders)
setShowInEditor ( $p_showInEditor ) : integer Sets the int for where to show the field
setStatus ( $p_status )
setType ( $p_type ) Changes the type of the field
showInEditor ( ) : integer Returns int for where to show the field
translationExists ( $p_languageId ) Quick lookup to see if the current language is already translated for this article type: used by delete and update in setName returns 0 if no translation or the phrase_id if there is one.

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

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

Returns an array of valid field data types.
public static DatabaseTypes ( $p_numericDigits = null, $p_numericPrecision = null ) : array
Результат array

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

Returns an array of fields from all article types that match the given conditions.
public static FetchFields ( $p_name = null, $p_articleType = null, $p_dataType = null, $p_negateName = false, $p_negateArticleType = false, $p_negateDataType = false, $p_selectHidden = true, $p_skipCache = false ) : array
$p_name if specified returns fields with the given name
$p_articleType if specified returns fields of the given article type
$p_dataType if specified returns the fields having the given data type
Результат array

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

public static SetFieldColor ( $p_article_type, $p_field_name, $p_color_value )

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

public static TypesConvertibleFrom ( $p_type )

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

Returns an array of types compatible with the given field type.
public static TypesConvertibleTo ( $p_type ) : array
Результат array

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

Get a human-readable representation of the column type.
public static VerboseTypeName ( $p_typeName, $p_languageId = 1, $p_rootTopicId = null ) : string
Результат string

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

public __construct ( $p_articleTypeName = null, $p_fieldName = null )

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

Create a column in the table.
public create ( string $p_type = null, array $p_params = [] )
$p_type string Can be one of: 'text', 'date', 'body', 'switch', 'numeric'.
$p_params array

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

Deletes the current article type field.
public delete ( )

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

Fetch a single record from the database for the given key.
public fetch ( array $p_recordSet = null, $p_forceExists = false ) : boolean
$p_recordSet array If the record has already been fetched and we just need to assign the data to the object's internal member variable.
Результат boolean TRUE on success, FALSE on failure

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

Returns the article type name.
public getArticleType ( ) : string
Результат string

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

public getColor ( )

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

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

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

public static getDefaultColor ( )

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

Gets the translation for a given language; default language is the session language. If no translation is set for that language, we return the dbTableName.
public getDisplayName ( $p_lang ) : string
Результат string

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

Gets the language code of the current translation language; or none if there is no translation.
public getDisplayNameLanguageCode ( $p_lang ) : string
Результат string

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

Returns whether articles of this type should be filtered out by default at listings.
public getFilter ( ) : boolean
Результат boolean

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

fn getType
public getGenericType ( )

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

Gets the maximum size of a article type
public getMaxSize ( ) : integer
Результат integer

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

Return an associative array of the metadata in ArticleFieldMetadata.
public getMetadata ( ) : array
Результат array

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

public getName ( ) : string
Результат string

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

Returns the highest weight + 1 or 0 for the starter
public getNextOrder ( ) : integer
Результат integer

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

Get the ordering of all fields; initially, a field has a field_weight of NULL when it is created. if we discover that a field has a field weight of NULL, we give it the MAX+1 field_weight. Returns a NUMERIC array of ORDER => FIELDNAME.
public getOrders ( ) : array
Результат array

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

public getPhraseId ( ) : -1
Результат -1

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

public getPrintName ( ) : string
Результат string

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

Returns the is_hidden status of a field. Returns 'hidden' or 'shown'.
public getStatus ( ) : string
Результат string (shown|hidden)

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

public getTopicTypeRootElement ( ) : string
Результат string

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

Returns an array of translation strings for the field name.
public getTranslations ( ) : array
Результат array

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

public getType ( ) : string
Результат string

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

fn VerboseTypeName
public getVerboseTypeName ( $p_languageId = 1 )

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

Returns true if the current field is a content field.
public isContent ( ) : boolean
Результат boolean

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

Returns true if the given type can be converted to the current field type.
public isConvertibleFrom ( $p_type ) : boolean
$p_type
Результат boolean

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

public isConvertibleTo ( $p_type )

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

Returns true if the current field is hidden.
public isHidden ( ) : boolean
Результат boolean

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

Rename the article type field.
public rename ( $p_newName )

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

Reorders the current field; accepts either "up" or "down"
public reorder ( $move )

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

public setColor ( $p_color )

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

Sets whether articles of this type should be filtered out by default at listings.
public setFilter ( $p_filter ) : boolean
Результат boolean

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

Sets the content flag. Returns true on success, false otherwise.
public setIsContent ( $p_isContent ) : boolean
$p_isContent
Результат boolean

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

Set the type name for the given language. A new entry in the database will be created if the language did not exist.
public setName ( integer $p_languageId, string $p_value ) : boolean
$p_languageId integer
$p_value string
Результат boolean

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

Saves the ordering of all the fields. Accepts an NUMERIC array of ORDERRANK => FIELDNAME. (see getOrders)
public setOrders ( $orderArray )

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

Sets the int for where to show the field
public setShowInEditor ( $p_showInEditor ) : integer
$p_showInEditor
Результат integer

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

public setStatus ( $p_status )

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

Changes the type of the field
public setType ( $p_type )

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

Returns int for where to show the field
public showInEditor ( ) : integer
Результат integer

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

Quick lookup to see if the current language is already translated for this article type: used by delete and update in setName returns 0 if no translation or the phrase_id if there is one.
public translationExists ( $p_languageId )

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

$m_columnNames публичное свойство

public $m_columnNames

$m_dbTableName публичное свойство

public $m_dbTableName

$m_keyColumnNames публичное свойство

public $m_keyColumnNames