__construct()
addFetchOptionJoin()
addPositionLimit()
appendStylePropertyXml()
assertValidCutOffOperator()
canEditStyleProperty()
canEditStylePropertyDefinition()
compileCssPropertyForCache()
compileCssProperty_cleanUp()
compileCssProperty_compileRules()
compileCssProperty_sanitize()
compileScalarPropertyForCache()
convertAtPropertiesToTemplateSyntax()
create()
createOrUpdateStylePropertyDefinition()
deleteStylePropertiesAndDefinitionsInStyle()
deleteStylePropertyDevelopmentFile()
deleteStylePropertyDevelopmentFileIfNeeded()
deleteStylePropertyGroupsInStyle()
fetchAllKeyed()
filterPropertiesByType()
getColorPalettePropertiesInStyle()
getConditionsForClause()
getContentTypeField()
getContentTypesWithField()
getDefaultStylePropertyDefinition()
getDefaultStylePropertyGroup()
getEffectiveStylePropertiesByGroup()
getEffectiveStylePropertiesInStyle()
getEffectiveStylePropertyGroupsInStyle()
getModelFromCache()
getOrderByClause()
getParentPathFromStyle()
getStyle()
getStylePropertiesInStyleByDefinitions()
getStylePropertiesInStyles()
getStylePropertyByDefinitionAndStyle()
getStylePropertyById()
getStylePropertyDefinitionById()
getStylePropertyDefinitionByNameAndStyle()
getStylePropertyDefinitionsByGroup()
getStylePropertyDefinitionsByIds()
getStylePropertyDefinitionsForAdminQuickSearch()
getStylePropertyDescriptionPhraseName()
getStylePropertyDevelopmentDirectory()
getStylePropertyDevelopmentFileName()
getStylePropertyDevelopmentXml()
getStylePropertyGroupById()
getStylePropertyGroupDescriptionPhraseName()
getStylePropertyGroupOptions()
getStylePropertyGroupTitlePhraseName()
getStylePropertyGroupsInStyles()
getStylePropertyTitlePhraseName()
groupStylePropertiesByStyle()
importStylePropertiesFromArray()
importStylePropertiesFromDevelopment()
importStylePropertyDevelopmentXml()
importStylePropertyXml()
keyPropertiesByName()
limitQueryResults()
moveStylePropertiesBetweenGroups()
moveStylePropertyDevelopmentFile()
parseBackgroundCss()
parseBorderCss()
parseFontCss()
parsePaddingMarginCss()
prepareLimitFetchOptions()
prepareStateLimitFromConditions()
prepareStyleProperties()
prepareStyleProperty()
prepareStylePropertyGroup()
prepareStylePropertyGroups()
prepareStylePropertyPhrases()
rebuildPropertyCacheForAllStyles()
rebuildPropertyCacheInStyleAndChildren()
replacePropertiesInTemplateForEditor()
replaceVariablesInStylePropertyValue()
resetLocalCacheData()
saveStylePropertiesInStyleFromInput()
saveStylePropertiesInStyleFromTemplate()
setAllowCachedRead()
setLocalCacheData()
standardizeNodePermissionsAndUserId()
standardizePermissionCombinationIdAndUserId()
standardizePermissionsAndUserId()
standardizeViewingUserReference()
standardizeViewingUserReferenceForNode()
translateEditorPropertiesToArray()
unserializePermissionsInList()
updatePropertyCacheInStyle()
updateStylePropertyDevelopmentFile()
updateStylePropertyValue()
writeStylePropertyDevelopmentFile()
_atToPropertyCallback()
_getCache()
_getCssValue()
_getCssValueRule()
_getDataRegistryModel()
_getDb()
_getLocalCacheData()
_getPaddingMarginShortCuts()
_getStyleModel()
$_allowCachedRead
$_cache
$_db
$_localCacheData
$_modelCache
$_tempProperties
Model for style properties and style property definitions.
Note that throughout, style ID -1 is the ACP master.
package | XenForo_StyleProperty |
---|
__construct()
Use create() statically unless you know what you're doing.
inherited_from | \XenForo_Model::__construct() |
---|
addFetchOptionJoin(array $fetchOptions, integer $join)
Join should be one of the constants.
inherited_from | \XenForo_Model::addFetchOptionJoin() |
---|
array
integer
addPositionLimit(string $table, integer $limit, integer $offset, string $column) : string
It no limit value is specified, nothing will be returned.
This must be added within a WHERE clause. If a clause is required, it will begin with "AND", so ensure there is a condition before it.
inherited_from | \XenForo_Model::addPositionLimit() |
---|
string
Name of the table alias to prefix. May be blank for no table reference.
integer
Number of records to limit to; ignored if <= 0
integer
Offset from the start of the records. 0+
string
Name of the column that is storing the position
string
Position limit clause if neededappendStylePropertyXml(\DOMElement $rootNode, integer $styleId, string | null $addOnId)
integer
Style to read values/definitions from
string
null
If not null, limits to values/definitions in the specified add-on
assertValidCutOffOperator(string $operator)
inherited_from | \XenForo_Model::assertValidCutOffOperator() |
---|
string
canEditStyleProperty(integer $styleId) : boolean
integer
boolean
canEditStylePropertyDefinition(integer $styleId) : boolean
integer
boolean
compileCssPropertyForCache(array $original, array $properties) : array
array
Original, input-based CSS rule
array
A list of all properties, for resolving variable style references
array
CSS rule for cachecompileCssProperty_cleanUp(array $output, array $original) : array
array
Output CSS property
array
Original format of CSS property
array
Updated output CSS propertycompileCssProperty_compileRules(array $output, array $original) : array
array
Output CSS property
array
Original format of CSS property
array
Updated output CSS propertycompileCssProperty_sanitize(array $output, array $original) : array
array
Output CSS property
array
Original format of CSS property
array
Updated output CSS propertycompileScalarPropertyForCache(string $original, array $properties) : string
string
Original property value
array
A list of all properties, for resolving variable style references
string
convertAtPropertiesToTemplateSyntax(string $text, array $properties) : string
string
array
string
create(string $class) : \XenForo_Model
The class must exist or be autoloadable or an exception will be thrown.
inherited_from | \XenForo_Model::create() |
---|
string
Class to load
createOrUpdateStylePropertyDefinition(integer $definitionId, array $input) : array
Input data is named after fields in the style property definition, as well as property_value_scalar and property_value_css.
integer
Definition to update; if 0, creates a new one
array
List of data from input to change in definition
array
Definition info after savingdeleteStylePropertiesAndDefinitionsInStyle(integer $styleId, string | null $addOnId, boolean $leaveChildCustomizations)
integer
Style to delete from. 0 for master, -1 for admin
string
null
If not null, limits deletions to an ad-on
boolean
If true, child customizations of a deleted definition will be left
deleteStylePropertyDevelopmentFile(string $name, integer $styleId)
string
integer
Definition style ID.
deleteStylePropertyDevelopmentFileIfNeeded(array $definition, array $property)
This is used when reverting a customized property; the file is only deleted if we're deleting the property from a style other than the one it was created in.
array
array
deleteStylePropertyGroupsInStyle(integer $styleId, string | null $addOnId)
integer
Style to delete from. 0 for master, -1 for admin
string
null
If not null, limits deletions to an ad-on
fetchAllKeyed(string $sql, string $key, mixed $bind, string $nullPrefix) : array
The 'key' parameter provides the column name with which to key the result. For example, calling fetchAllKeyed('SELECT item_id, title, date FROM table', 'item_id') would result in an array keyed by item_id: [$itemId] => array('item_id' => $itemId, 'title' => $title, 'date' => $date)
Note that the specified key must exist in the query result, or it will be ignored.
inherited_from | \XenForo_Model::fetchAllKeyed() |
---|
string
SQL to execute
string
Column with which to key the results array
mixed
Parameters for the SQL
string
If the key is null, prefix the counter with this
array
filterPropertiesByType(array $properties)
array
[scalar props, css props]
getColorPalettePropertiesInStyle(integer $styleId, array $path, array $properties) : array
integer
array
null
Path from style to root (earlier positions closer to style); if null, determined automatically
array
null
List of properties in this style and all parent styles; if null, determined automatically
array
getConditionsForClause(array $sqlConditions) : string
This always returns a value that can be used in a clause such as WHERE.
inherited_from | \XenForo_Model::getConditionsForClause() |
---|
array
string
getContentTypeField(string $contentType, string $fieldName) : string | false
inherited_from | \XenForo_Model::getContentTypeField() |
---|
string
string
string
false
getContentTypesWithField(string $fieldName) : array
inherited_from | \XenForo_Model::getContentTypesWithField() |
---|
string
array
Format: [content type] => field valuegetDefaultStylePropertyDefinition(integer $styleId, string $groupName) : array
integer
string
array
getDefaultStylePropertyGroup(integer $styleId) : array
integer
array
getEffectiveStylePropertiesByGroup(integer $styleId, array $path, array $properties) : array
Properties are organized within the groups (in properties key).
integer
array
null
Path from style to root (earlier positions closer to style); if null, determined automatically
array
null
List of properties in this style and all parent styles; if null, determined automatically
array
Format: [group name] => group info, with [properties][definition id] => property infogetEffectiveStylePropertiesInStyle(integer $styleId, array $path, array $properties) : array
This includes properties that have been customized/created in a parent style.
Includes effectiveState key in each property (customized, inherited, default).
integer
array
null
Path from style to root (earlier positions closer to style); if null, determined automatically
array
null
List of properties in this style and all parent styles; if null, determined automatically
array
Format: [definition id] => infogetEffectiveStylePropertyGroupsInStyle(integer $styleId, array $path) : array
integer
array
null
Path from style to root (earlier positions closer to style); if null, determined automatically
array
Format: [group name] => infogetModelFromCache(string $class) : \XenForo_Model
If it does not exist, it will be instantiated.
inherited_from | \XenForo_Model::getModelFromCache() |
---|
string
Name of the class to load
getOrderByClause(array $choices, array $fetchOptions, string $defaultOrderSql) : string
inherited_from | \XenForo_Model::getOrderByClause() |
---|
array
array
string
string
Order by clause or empty stringgetParentPathFromStyle($styleId) : array
For real styles, this is the parent list. However, this function can handle styles 0 (master) and -1 (ACP).
array
Parent list; earlier positions are more specificgetStyle(integer $styleId) : array | false
integer
array
false
getStylePropertiesInStyleByDefinitions(integer $styleId, array $definitionIds) : array
integer
array
array
Format: [definition id] => infogetStylePropertiesInStyles(array $styleIds) : array
This only includes properties that have been customized or initially defined in the specified styles. Includes definition info.
array
array
Format: [property id] => infogetStylePropertyByDefinitionAndStyle(integer $definitionId, integer $styleId) : array | false
Includes definition info.
integer
integer
array
false
getStylePropertyById(integer $id) : array | false
Includes definition info.
integer
array
false
getStylePropertyDefinitionById(integer $propertyDefinitionId) : array | false
Includes default property value.
integer
array
false
getStylePropertyDefinitionByNameAndStyle(string $name, integer $styleId) : array | false
Includes default property value.
string
integer
array
false
getStylePropertyDefinitionsByGroup($groupName, integer | null $styleId) : array
integer
null
If specified, limits to definitions in a specified style
array
getStylePropertyDefinitionsByIds(array $propertyDefinitionIds) : array
Includes default property value.
array
array
Format: [property definition id] => infogetStylePropertyDefinitionsForAdminQuickSearch(string $searchText, array $propertyNames) : array
Does not include default property value.
string
array
array
getStylePropertyDescriptionPhraseName(array $property) : string
array
string
getStylePropertyDevelopmentDirectory(integer $styleId) : string
Returns an empty string for non-master properties.
integer
string
getStylePropertyDevelopmentFileName(string $propertyName, integer $styleId) : string
Ensures directory is writable.
string
integer
string
getStylePropertyDevelopmentXml(integer $styleId) : \DOMDocument
getStylePropertyGroupById(integer $groupId) : array | false
integer
array
false
getStylePropertyGroupDescriptionPhraseName(array $group) : string
array
string
getStylePropertyGroupOptions(integer $styleId) : array
integer
array
Format: [name] => titlegetStylePropertyGroupTitlePhraseName(array $group) : string
array
string
getStylePropertyGroupsInStyles(array $styleIds) : array
array
array
Format: [property group id] => infogetStylePropertyTitlePhraseName(array $property) : string
array
string
groupStylePropertiesByStyle(array $properties) : array
This uses the customization style (not definition style) for grouping.
array
array
Format: [style id][definition id] => infoimportStylePropertiesFromArray(array $newProperties, array $newGroups, integer $styleId, string | null $addOnId)
array
List of properties and definitions to import
array
List of groups to import
integer
Target style ID
string
null
If not null, only replaces properties with this add-on; otherwise, all in style
importStylePropertiesFromDevelopment(integer $styleId)
This only imports one style's worth of properties at a time.
integer
Style to import for
importStylePropertyDevelopmentXml(string $fileName, $styleId)
string
File to read the XML from
importStylePropertyXml(\SimpleXMLElement $xml, integer $styleId, string | null $addOnId)
integer
Target style ID
string
null
If not null, target add-on for definitions; if null, add-on is ''
keyPropertiesByName(array $properties) : array
This is only safe to do when getting properties (effective or not) for a single style.
array
array
limitQueryResults(string $query, integer $limit, integer $offset) : string
If the limit value is 0 or less, no clause is applied.
inherited_from | \XenForo_Model::limitQueryResults() |
---|
string
SQL query to run
integer
Number of records to limit to; ignored if <= 0
integer
Offset from the start of the records. 0+
string
Query with limit applied if necessarymoveStylePropertiesBetweenGroups(string $sourceGroup, string $destinationGroup)
string
string
moveStylePropertyDevelopmentFile(array $oldDefinition, array $newDefinition)
array
array
parseBackgroundCss(string $value) : array | false
string
array
false
List of property rules to apply or false if shortcut could not be parsedparseBorderCss(string $value, string $name) : array | false
string
string
The name of the shortcut (border, border-top, etc)
array
false
List of property rules to apply or false if shortcut could not be parsedparseFontCss(string $value) : array | false
string
array
false
List of property rules to apply or false if shortcut could not be parsedparsePaddingMarginCss(string $value, array $values) : boolean
string
array
By reference. Pushes out the effective padding/margin values to later be pulled together.
boolean
prepareLimitFetchOptions(array $fetchOptions) : array
Includes: limit, offset, page, and perPage.
inherited_from | \XenForo_Model::prepareLimitFetchOptions() |
---|
array
Unprepared options
array
Limit options; keys: limit, offsetprepareStateLimitFromConditions(array $fetchOptions, string $table, string $stateField, string $userField) : string
Looks for keys "deleted" and "moderated".
inherited_from | \XenForo_Model::prepareStateLimitFromConditions() |
---|
array
string
Name of the table to prefix the state and user fields with
string
Name of the field that holds the state
string
Name of the field that holds the user ID
string
SQL condition to limit stateprepareStyleProperties(array $properties, integer | null $displayStyleId) : array
array
integer
null
The ID of the style the properties are being edited in
array
prepareStyleProperty(array $property, integer | null $displayStyleId) : array
array
integer
null
The ID of the style the properties are being edited in
array
Prepared versionprepareStylePropertyGroup(array $group, integer | null $displayStyleId) : array
If properties are found within, they will be automatically prepared.
integer
null
The ID of the style the groups/properties are being edited in
array
Prepared versionprepareStylePropertyGroups(array $groups, integer | null $displayStyleId) : array
If properties are found within, they will be automatically prepared.
array
integer
null
The ID of the style the groups/properties are being edited in
array
prepareStylePropertyPhrases(array $property) : array
array
array
rebuildPropertyCacheForAllStyles()
rebuildPropertyCacheInStyleAndChildren(integer $styleId) : array
integer
array
The property cache for the requested stylereplacePropertiesInTemplateForEditor(string $templateText, integer $editStyleId, array $properties) : string
This allows for easier editing and viewing of properties.
string
Template with {xen:property} references
integer
The style the template is being edited in
array
null
A list of valid style properties; if null, grabbed automatically ([name] => property)
string
Replaced template textreplaceVariablesInStylePropertyValue(string $value, array $properties, array $seenProperties) : string
string
Property value. This is an individual string value.
array
List of properites to read from.
string
resetLocalCacheData($name)
This can be used if you know when some cached data has expired.
inherited_from | \XenForo_Model::resetLocalCacheData() |
---|
saveStylePropertiesInStyleFromInput(integer $styleId, array $properties, array $reset)
integer
Style to change properties in
array
Properties from input; keyed by definition ID
array
List of properties to reset if customized; keyed by definition ID
saveStylePropertiesInStyleFromTemplate(integer $styleId, array $updates, array $properties)
integer
Style to save properties into
array
List of property data to update (return from translateEditorPropertiesToArray)
array
List of style properties available in this style. Keyed by name!
setAllowCachedRead($allowCachedRead)
This may be controllable on an individual level basis, if the implementation allows it.
inherited_from | \XenForo_Model::setAllowCachedRead() |
---|
boolean
setLocalCacheData(string $name, $value)
This should only be used if you know what you're doing or for testing purposes!
Note that you cannot get the existing data via the public interface. If you think you need the set data, use a new object. It defaults to empty. :)
inherited_from | \XenForo_Model::setLocalCacheData() |
---|
string
standardizeNodePermissionsAndUserId(integer $nodeId, array | null $permissions, integer | null $userId)
If an invalid permission set or user ID is provided, the current visitor's will be used.
inherited_from | \XenForo_Model::standardizeNodePermissionsAndUserId() |
---|
integer
Node permissions are for
array
null
Permissions for node or null to use current visitor's permissions
integer
null
User permissions belong to or null to use current visitor
standardizePermissionCombinationIdAndUserId(integer | null $permissionCombinationId, integer | null $userId)
If null, users current visitor's values.
inherited_from | \XenForo_Model::standardizePermissionCombinationIdAndUserId() |
---|
integer
null
Permission combination ID or null to use current visitor
integer
null
User permissions belong to or null to use current visitor
standardizePermissionsAndUserId(array | null $permissions, integer | null $userId)
If an invalid permission set or user ID is provided, the current visitor's will be used.
inherited_from | \XenForo_Model::standardizePermissionsAndUserId() |
---|
array
null
Global pPermissions or null to use current visitor's permissions
integer
null
User permissions belong to or null to use current visitor
standardizeViewingUserReference(array $viewingUser)
This array must contain all basic user info (preferably all user info) and include global permissions in a "permissions" key. If not an array or missing a user_id, the visitor's values will be used.
inherited_from | \XenForo_Model::standardizeViewingUserReference() |
---|
array
null
standardizeViewingUserReferenceForNode(integer $nodeId, array $viewingUser, array $nodePermissions)
inherited_from | \XenForo_Model::standardizeViewingUserReferenceForNode() |
---|
integer
array
null
Viewing user; if null, use visitor
array
null
Permissions for this node; if null, use visitor's
translateEditorPropertiesToArray(string $templateText, string $outputText, array $properties) : array
string
Template with @ property references
string
By reference, the template with {xen:property} values instead
array
A list of valid style properties in the correct style; keyed by named
array
Property values from the template text. Change detection still needs to be run.unserializePermissionsInList(array $items, string $serializedKey, string $targetKey) : array
inherited_from | \XenForo_Model::unserializePermissionsInList() |
---|
array
List of items
string
Key where serialized permissions are
string
Key where unserialized permissions will go
array
List of items with permissions unserializedupdatePropertyCacheInStyle(integer $styleId, array $effectiveProperties, array $style) : array | false
integer
array
List of effective properties in style.
array
null
Style information; queried if needed
array
false
Compiled property cacheupdateStylePropertyDevelopmentFile(array $definition)
array
updateStylePropertyValue(array $definition, integer $styleId, mixed $newValue, array $extraOptions, mixed $existingProperty, string $existingValue)
array
Style property definition
integer
Style property is being changed in
mixed
New value (string for scalar; array for css)
boolean
Extra options to pass to the data writer
mixed
If array/false, considered to be the property to be updated; otherwise, determined automatically
string
The existing value in the place of this property. This may come from the parent style (unlike $existingProperty). This prevents customization from occurring when a value isn't changed.
writeStylePropertyDevelopmentFile(array $definition, array $property)
array
Property definition
array
Property value
_atToPropertyCallback($property)
_getCache(boolean $forceCachedRead) : \Zend_Cache_Core | \Zend_Cache_Frontend | false
If cache reads are disabled, this will return false.
inherited_from | \XenForo_Model::_getCache() |
---|
boolean
If true, the global "allow cached read" value is ignored
\Zend_Cache_Core
\Zend_Cache_Frontend
false
_getCssValue(array $search, string | array $key) : string
Gets the value(s) for one or more CSS rule keys. Multiple keys will be separated by a space.
array
Array to search for keys in
string
array
One or more keys to search for
string
Values for matching keys; space separated_getCssValueRule(array $search, string | array $key) : string
Gets the full rule(s) for one or more CSS rule keys.
array
Array to search for keys in
string
array
One or more keys to search for
string
Full CSS rules_getDb() : \Zend_Db_Adapter_Abstract
inherited_from | \XenForo_Model::_getDb() |
---|
\Zend_Db_Adapter_Abstract
_getLocalCacheData(string $name) : mixed
inherited_from | \XenForo_Model::_getLocalCacheData() |
---|
string
mixed
_getPaddingMarginShortCuts($type, array $output)
$_allowCachedRead : boolean
If not, it should be retrieved from the source.
inherited_from | \XenForo_Model::$$_allowCachedRead |
---|
$_cache : \Zend_Cache_Core | \Zend_Cache_Frontend
inherited_from | \XenForo_Model::$$_cache |
---|
$_db : \Zend_Db_Adapter_Abstract
inherited_from | \XenForo_Model::$$_db |
---|
$_localCacheData : array
This data is generally treated as canonical, even if {$_allowCachedRead} is false.
inherited_from | \XenForo_Model::$$_localCacheData |
---|
$_modelCache : array
inherited_from | \XenForo_Model::$$_modelCache |
---|
$_tempProperties