PHP 클래스 ArticleTypeField

상속: extends DatabaseObject
파일 보기 프로젝트 열기: sourcefabric/newscoop 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$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