model/modx/modplugin.class.php
- extends
- modScript
- package
- modx
- Classes
- modPlugin
Description
Provides a non-cacheable modScript implementation representing plugins.
{@inheritdoc}
\modPlugin
- Extends from
- \modScript
- extends
- modScript
- package
- modx
- Methods
- __construct
- getContent
- getPropertySet
- listGroups
- remove
- save
- setContent
Description
Provides a non-cacheable modScript implementation representing plugins.
{@inheritdoc}
Methods
__construct
__construct(
\xPDO $xpdo
)
:
\xPDOObject
Constructor
Do not call the constructor directly; see {@link xPDO::newObject()}.
All derivatives of xPDOObject must redeclare this method, and must call the parent method explicitly before any additional logic is executed, e.g.
public function __construct(xPDO & $xpdo) {
parent :: __construct($xpdo);
// Any additional constructor tasks here
}
Arguments
- $xpdo
- \xPDO
&$xpdo A reference to a valid xPDO instance.
Output
Details
- visibility
- public
- final
- false
- static
- false
getContent
getContent(
array $options
=
array
)
:
string
Overrides modElement::getContent to get the source content of this plugin.
{@inheritdoc}
Arguments
- $options
- array
Output
- string
- The source content.
Details
- visibility
- public
- final
- false
- static
- false
getPropertySet
getPropertySet(
string|null $setName
=
null
)
:
array|null
Overrides modElement::getPropertySet to handle separate plugin event property set calls.
{@inheritdoc}
Arguments
- $setName
- stringnull
An explicit property set name to search for.
Output
- array|null
- An array of properties or null if no set is found.
Details
- visibility
- public
- final
- false
- static
- false
listGroups
listGroups(
$resource, $sort
=
array, $limit
=
0, $offset
=
0
)
:
Arguments
- $resource
- $sort
- $limit
- $offset
Details
- visibility
- public
- final
- false
- static
- true
remove
remove(
array $ancestors
=
array
)
:
boolean
Overrides modElement::remove to add custom error logging and fire modX-specific events.
{@inheritdoc}
Arguments
- $ancestors
- array
Keeps track of classes which have already been removed to prevent loop with circular references.
Output
- boolean
- Returns true on success, false on failure.
Details
- visibility
- public
- final
- false
- static
- false
save
save(
boolean|integer $cacheFlag
=
null
)
:
boolean
Overrides modElement::save to add custom error logging and fire modX-specific events.
{@inheritdoc}
Arguments
- $cacheFlag
- booleaninteger
Indicates if the saved object(s) should be cached and optionally, by specifying an integer value, for how many seconds before expiring. Overrides the cacheFlag for the object(s).
Output
- boolean
- Returns true on success, false on failure.
Details
- visibility
- public
- final
- false
- static
- false
setContent
setContent(
string $content, array $options
=
array
)
:
string
Overrides modElement::setContent to set the source content of this plugin.
{@inheritdoc}
Arguments
- $content
- string
- $options
- array
Output
- string
- True if successfully set
Details
- visibility
- public
- final
- false
- static
- false