|
KWeb
6.4
|
Content description class. More...
Public Member Functions | |
| __construct ($meta=null, $content=null) | |
| addMeta ($name, $value=null, $lang=false, $append=false) | |
| addDate ($name, $value=null, $lang=false) | |
| addContent ($name, $value=null, $lang=false, $append=true) | |
| getValues ($type=false, $lang=false, $includeLang=false) | |
| Returns all fields of specified type and language. | |
| getStrings ($type=false, $lang=false, $includeLang=false) | |
| Returns all fields of specified type and language as strings. | |
| getValue ($name=false, $lang=false, $includeLang=false) | |
| Returns all fields of specified type and language. | |
| getLanguages ($includeNonTranslateable) | |
| convertToString ($name, $value=null, $type=null) | |
| addField ($type, $name, $value=null, $lang=false, $append=false) | |
| Adds a field to the content. | |
Data Fields | |
| const | GENRE = 'genre' |
| const | ID = 'id' |
| const | STATUS = 'status' |
| const | TYPE = 'type' |
| const | OWNER = 'owner' |
| const | SECTION = 'section' |
| const | TITLE = 'title' |
| const | INFO = 'info' |
| const | CONTENT = 'content' |
| const | KEYWORDS = 'keywords' |
| array | |
| const | CREATED = 'created' |
| const | MODIFIED = 'modified' |
| const | VISIBLE = 'visible' |
| const | HIDDEN = 'hidden' |
| const | VIEWABLE = 'viewable' |
| boolean Is it viewable by anonymous user? | |
| const | NAME = 'name' |
| const | URL = 'url' |
| const | FILE = 'file' |
| const | FOREIGN_ID = 'foreign' |
| const | LANG = 'lang' |
| const | SCORE = 'score' |
| const | OFFSET = 'offset' |
| const | TYPE_CONTENT = 'content' |
| const | TYPE_META = 'meta' |
| const | TYPE_DATE = 'date' |
Protected Attributes | |
| $data = array() | |
| $fields = array() | |
Content description class.
| KWebContent::addContent | ( | $ | name, |
| $ | value = null, |
||
| $ | lang = false, |
||
| $ | append = true |
||
| ) |
| KWebContent::addDate | ( | $ | name, |
| $ | value = null, |
||
| $ | lang = false |
||
| ) |
| KWebContent::addField | ( | $ | type, |
| $ | name, | ||
| $ | value = null, |
||
| $ | lang = false, |
||
| $ | append = false |
||
| ) |
Adds a field to the content.
| $type | Type of field (FIELD_META, FIELD_DATE, FIELD_CONTENT) |
| $name | Name of field or array of fields (name => value, name => value) |
| $value | Value of field, or null if fields are passed as array through $name |
| $lang | Language of data, or false for no language |
| $append | TRUE to append to existing data |
| KWebContent::addMeta | ( | $ | name, |
| $ | value = null, |
||
| $ | lang = false, |
||
| $ | append = false |
||
| ) |
| KWebContent::getLanguages | ( | $ | includeNonTranslateable | ) |
| KWebContent::getStrings | ( | $ | type = false, |
| $ | lang = false, |
||
| $ | includeLang = false |
||
| ) |
Returns all fields of specified type and language as strings.
| $type | FALSE for all field types, or one of TYPE_* values |
| $lang | FALSE for non-translateable content, or language id |
| $includeLang | Includes another language in the result, TRUE for non-translateable content, or language id |
| KWebContent::getValue | ( | $ | name = false, |
| $ | lang = false, |
||
| $ | includeLang = false |
||
| ) |
Returns all fields of specified type and language.
| $lang | FALSE for non-translateable content, or language id |
| $includeLang | Includes another language in the result, TRUE for non-translateable content, or language id |
| KWebContent::getValues | ( | $ | type = false, |
| $ | lang = false, |
||
| $ | includeLang = false |
||
| ) |
Returns all fields of specified type and language.
| $type | FALSE for all field types, or one of TYPE_* values |
| $lang | FALSE for non-translateable content, or language id |
| $includeLang | Includes another language in the result, TRUE for non-translateable content, or language id |
KWebContent::$data = array() [protected] |
KWebContent::$fields = array() [protected] |
| const KWebContent::CONTENT = 'content' |
| const KWebContent::CREATED = 'created' |
| const KWebContent::FILE = 'file' |
| const KWebContent::FOREIGN_ID = 'foreign' |
| const KWebContent::GENRE = 'genre' |
| const KWebContent::HIDDEN = 'hidden' |
| const KWebContent::ID = 'id' |
| const KWebContent::INFO = 'info' |
| const KWebContent::KEYWORDS = 'keywords' |
array
| const KWebContent::LANG = 'lang' |
| const KWebContent::MODIFIED = 'modified' |
| const KWebContent::NAME = 'name' |
| const KWebContent::OFFSET = 'offset' |
| const KWebContent::OWNER = 'owner' |
| const KWebContent::SCORE = 'score' |
| const KWebContent::SECTION = 'section' |
| const KWebContent::STATUS = 'status' |
| const KWebContent::TITLE = 'title' |
| const KWebContent::TYPE = 'type' |
| const KWebContent::TYPE_CONTENT = 'content' |
| const KWebContent::TYPE_DATE = 'date' |
| const KWebContent::TYPE_META = 'meta' |
| const KWebContent::URL = 'url' |
| const KWebContent::VIEWABLE = 'viewable' |
boolean Is it viewable by anonymous user?
| const KWebContent::VISIBLE = 'visible' |