Plugin

Package: Record

class Plugin

extends Omeka_Record_AbstractRecord

implements Zend_Acl_Resource_Interface

A plugin and its metadata.

This record represents the data Omeka stores about each plugin and uses to manage the plugins, it is not a part of any plugin itself.

property Plugin::$name

string

Directory name for the plugin.

property Plugin::$active

int

Whether this plugin is active.

property Plugin::$version

string

Version string for the currently-installed plugin.

property Plugin::$_displayName

protected string

Human-readable display name of the plugin.

property Plugin::$_author

protected string

The plugin’s author.

property Plugin::$_description

protected string

Description of the plugin.

protected string

URL for documentation or further information about the plugin.

property Plugin::$_loaded

protected bool

Whether the plugin has been loaded.

property Plugin::$_hasConfig

protected bool

Whether the plugin has a custom configuration form.

property Plugin::$_requiredPlugins

protected array

Directory names of required plugins.

property Plugin::$_optionalPlugins

protected array

Directory names of optional plugins.

property Plugin::$_minimumOmekaVersion

protected string

Minimum Omeka version requirement for the plugin.

property Plugin::$_testedUpToVersion

protected string

Maximum version of Omeka that the plugin has been tested on.

property Plugin::$_iniVersion

protected string

Version of the plugin that is stored in the INI.

property Plugin::$_iniTags

protected array

List of tags associated with this plugin, as retrieved from the ini file.

Plugin::_validate()

Validate the plugin.

The directory name must be set.

Plugin::getDirectoryName()

Get the name of the directory containing the plugin.

Returns:

string

Plugin::setDirectoryName($name)

Set the name of the directory containing the plugin.

Parameters:
  • $name (string) –

Returns:

Plugin

Plugin::getDisplayName()

Get the human-readable name of the plugin.

If there is no human-readable name available, returns the directory name instead.

Returns:

string

Plugin::setDisplayName($name)

Set the human-readable name of the plugin.

Parameters:
  • $name (string) –

Returns:

Plugin

Plugin::getAuthor()

Get the plugin’s author.

Returns:

string

Plugin::setAuthor($author)

Set the author’s name.

Parameters:
  • $author (string) –

Returns:

Plugin

Plugin::getDescription()

Get the description of the plugin.

Returns:

string

Plugin::setDescription($description)

Set the description of the plugin.

Parameters:
  • $description (string) –

Returns:

Plugin

Plugin::getMinimumOmekaVersion()

Get the minimum version of Omeka that this plugin requires to work.

Returns:

string

Plugin::setMinimumOmekaVersion($version)

Set the minimum required version of Omeka.

Parameters:
  • $version (string) –

Returns:

Plugin

Plugin::getTestedUpToOmekaVersion()

Get the version of Omeka that this plugin is tested up to.

Returns:

string

Plugin::setTestedUpToOmekaVersion($version)

Set the version of Omeka that this plugin is tested up to.

Parameters:
  • $version (string) –

Returns:

Plugin

Plugin::getRequiredPlugins()

Get the list of plugins that are required for this plugin to work.

Returns:

array

Plugin::setRequiredPlugins($plugins)

Set the list of plugins that are required for this plugin to work.

Parameters:
  • $plugins

Returns:

Plugin

Plugin::getOptionalPlugins()

Get the list of plugins that can be used, but are not required by, this plugin.

Returns:

array

Plugin::setOptionalPlugins($plugins)

Set the list of optional plugins.

Parameters:
  • $plugins

Returns:

Plugin

Plugin::getIniTags()

Get the list of tags for this plugin (from the ini file).

Returns:

array

Plugin::setIniTags($tags)

Set the list of tags for this plugin.

Parameters:
  • $tags

Returns:

Plugin

Plugin::getSupportLinkUrl()

Get the support link url from plugin.ini

Returns:

string

Plugin::setSupportLinkUrl($link)

Set the support link url from plugin.ini

Parameters:
  • $link

Returns:

Plugin

Plugin::getLinkUrl()

Get the URL link from the plugin.ini.

Returns:

string

Plugin::setLinkUrl($link)

Set the link from the plugin.ini.

Parameters:
  • $link (string) –

Returns:

Plugin

Plugin::isInstalled()

Determine whether the Plugin has been installed.

Returns:

bool

Plugin::isLoaded()

Determine whether the Plugin has been loaded.

Returns:

bool

Plugin::setLoaded($flag)

Set whether the plugin has been loaded.

Parameters:
  • $flag (bool) –

Returns:

Plugin

Plugin::isActive()

Determine whether the plugin is active.

Returns:

bool

Plugin::setActive($flag)

Set whether the plugin is active.

Parameters:
  • $flag (bool) –

Returns:

Plugin

Plugin::hasConfig()

Determine whether the plugin has a custom configuration form.

Returns:

bool

Plugin::setHasConfig($flag)

Set whether the plugin has a custom configuration form.

Parameters:
  • $flag (bool) –

Returns:

Plugin

Plugin::getIniVersion()

Get the version of the plugin stored in the INI file.

Returns:

string

Plugin::setIniVersion($version)

Set the version of the plugin that is indicated by the INI file.

Parameters:
  • $version (string) –

Returns:

Plugin

Plugin::getDbVersion()

Get the version of the plugin that is stored in the database.

Returns:

string

Plugin::setDbVersion($version)

Set the version of the plugin that is stored in the database.

Parameters:
  • $version (string) –

Returns:

Plugin

Plugin::hasNewVersion()

Determine whether there is a new version of the plugin available.

Returns:

bool

Plugin::meetsOmekaMinimumVersion()

Determine whether this Omeka install meets the plugin’s minimum version requirements.

If the field is not set, assume that it meets the requirements. If the field is set, it must be greater than the current version of Omeka.

Returns:

bool

Plugin::meetsOmekaTestedUpToVersion()

Determine whether this Omeka version has been tested for use with the plugin.

Returns:

bool

Plugin::getResourceId()

Declare the Plugin model as relating to the Plugins ACL resource.

Returns:

string