Class JTableObserverTags
Abstract class defining methods that can be implemented by an Observer class of a JTable class (which is an Observable). Attaches $this Observer to the $table in the constructor. The classes extending this class should not be instanciated directly, as they are automatically instanciated by the JObserverMapper
- JTableObserver implements JObserverInterface
- JTableObserverTags
Copyright: Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
License: General Public License version 2 or later; see LICENSE
Since: 3.1.2
Located at joomla/table/observer/tags.php
Methods summary
public static
|
#
createObserver(
Creates the associated observer instance and attaches it to the $observableObject Creates the associated tags helper class instance $typeAlias can be of the form "{variableName}.type", automatically replacing {variableName} with table-instance variables variableName |
public
|
#
onBeforeStore( boolean $updateNulls, string $tableKey )
Pre-processor for $table->store($updateNulls) |
public
|
#
onAfterStore( boolean & $result )
Post-processor for $table->store($updateNulls) You can change optional params newTags and replaceTags of tagsHelper with method setNewTagsToAdd |
public
|
|
public
boolean
|
#
setNewTags( array $newTags, boolean $replaceTags )
Sets the new tags to be added or to replace existing tags |
protected
|
#
parseTypeAlias( )
Internal method Parses a TypeAlias of the form "{variableName}.type", replacing {variableName} with table-instance variables variableName Storing result into $this->tagsHelper->typeAlias |
Methods inherited from JTableObserver
__construct()
,
onAfterDelete()
,
onAfterLoad()
,
onBeforeLoad()
Magic methods summary
Properties summary
protected
|
$tagsHelper |
#
Helper object for managing tags |
protected
string
|
$typeAliasPattern |
#
The pattern for this table's TypeAlias |
protected
array
|
$newTags |
#
Override for postStoreProcess param newTags, Set by setNewTags, used by onAfterStore and onBeforeStore |
protected
boolean
|
$replaceTags |
#
Override for postStoreProcess param replaceTags. Set by setNewTags, used by onAfterStore |
public static
|
$_myTableForPregreplaceOnly |
#
Not public, so marking private and deprecated, but needed internally in parseTypeAlias for PHP < 5.4.0 as it's not passing context $this to closure function. |