PHP Class Newscoop\Services\Plugins\ManagerService

Manage plugins installation, status and more...
Afficher le fichier Open project: sourcefabric/newscoop Class Usage Examples

Méthodes publiques

Свойство Type Description
$pluginsDir string Plugins directory

Protected Properties

Свойство Type Description
$config array Config array
$dev string Application environment
$dispatcher Newscoop\EventDispatcher\EventDispatcher
$em Doctrine\ORM\EntityManager
$logger Symfony\Bridge\Monolog\Logger Logger
$newsoopDir string Newscoop root directory
$pluginsService Newscoop\Services\Plugins\PluginsService Plugins service

Méthodes publiques

Méthode Description
__construct ( EntityManager $em, Newscoop\EventDispatcher\EventDispatcher $dispatcher, $pluginsService, Symfony\Bridge\Monolog\Logger $logger, array $config )
disablePlugin ( Plugin $plugin ) Disable plugin
dispatchEventForPlugin ( string $pluginName, string $eventName, mixed $output = null ) Dispatch events for plugins
enablePlugin ( Plugin $plugin ) Enable plugin
findAvaiablePlugins ( ) : array Find avaiable plugins
getInstalledPlugins ( ) : array Get installed plugins
installComposer ( ) Install composer
installPlugin ( string $pluginName, string $version, Symfony\Component\Console\Output\OutputInterface $output, boolean $notify = true ) Install plugin inside Newscoop - it's a wrapper for all tasks connected with plugin installation
isInstalled ( string $pluginName ) : boolean Check if plugin is installed TODO
removePlugin ( string $pluginName, Symfony\Component\Console\Output\OutputInterface $output, boolean $notify = true ) Remove plugin from newscoop (composer+database+cleaning)
updatePlugin ( string $pluginName, string $version, Symfony\Component\Console\Output\OutputInterface $output, boolean $notify = true ) Update installed plugin
upgrade ( Symfony\Component\Console\Output\OutputInterface $output, $doUpdate = false ) Reinstall plugins after Newscoop upgrade (re-add them to composer)

Private Methods

Méthode Description
clearCache ( Symfony\Component\Console\Output\OutputInterface $output ) Clear cache after plugin installation
handleConfig ( array $config )
prepareCacheDir ( )
saveAvaiablePluginsToCacheFile ( )

Method Details

__construct() public méthode

public __construct ( EntityManager $em, Newscoop\EventDispatcher\EventDispatcher $dispatcher, $pluginsService, Symfony\Bridge\Monolog\Logger $logger, array $config )
$em Doctrine\ORM\EntityManager
$dispatcher Newscoop\EventDispatcher\EventDispatcher
$logger Symfony\Bridge\Monolog\Logger
$config array

disablePlugin() public méthode

Disable plugin
public disablePlugin ( Plugin $plugin )
$plugin Newscoop\Entity\Plugin

dispatchEventForPlugin() public méthode

Dispatch events for plugins
public dispatchEventForPlugin ( string $pluginName, string $eventName, mixed $output = null )
$pluginName string
$eventName string
$output mixed

enablePlugin() public méthode

Enable plugin
public enablePlugin ( Plugin $plugin )
$plugin Newscoop\Entity\Plugin

findAvaiablePlugins() public méthode

Find avaiable plugins
public findAvaiablePlugins ( ) : array
Résultat array array('plugin/name' => \Class\Name)

getInstalledPlugins() public méthode

Get installed plugins
public getInstalledPlugins ( ) : array
Résultat array Array with installed plugins info

installComposer() public méthode

Install composer
public installComposer ( )

installPlugin() public méthode

Install plugin inside Newscoop - it's a wrapper for all tasks connected with plugin installation
public installPlugin ( string $pluginName, string $version, Symfony\Component\Console\Output\OutputInterface $output, boolean $notify = true )
$pluginName string
$version string
$output Symfony\Component\Console\Output\OutputInterface
$notify boolean

isInstalled() public méthode

Check if plugin is installed TODO
public isInstalled ( string $pluginName ) : boolean
$pluginName string
Résultat boolean

removePlugin() public méthode

Remove plugin from newscoop (composer+database+cleaning)
public removePlugin ( string $pluginName, Symfony\Component\Console\Output\OutputInterface $output, boolean $notify = true )
$pluginName string
$output Symfony\Component\Console\Output\OutputInterface
$notify boolean

updatePlugin() public méthode

Update installed plugin
public updatePlugin ( string $pluginName, string $version, Symfony\Component\Console\Output\OutputInterface $output, boolean $notify = true )
$pluginName string
$version string
$output Symfony\Component\Console\Output\OutputInterface
$notify boolean

upgrade() public méthode

Reinstall plugins after Newscoop upgrade (re-add them to composer)
public upgrade ( Symfony\Component\Console\Output\OutputInterface $output, $doUpdate = false )
$output Symfony\Component\Console\Output\OutputInterface

Property Details

$config protected_oe property

Config array
protected array $config
Résultat array

$dev protected_oe property

Application environment
protected string $dev
Résultat string

$dispatcher protected_oe property

protected EventDispatcher,Newscoop\EventDispatcher $dispatcher
Résultat Newscoop\EventDispatcher\EventDispatcher

$em protected_oe property

protected EntityManager,Doctrine\ORM $em
Résultat Doctrine\ORM\EntityManager

$logger protected_oe property

Logger
protected Logger,Symfony\Bridge\Monolog $logger
Résultat Symfony\Bridge\Monolog\Logger

$newsoopDir protected_oe property

Newscoop root directory
protected string $newsoopDir
Résultat string

$pluginsDir public_oe property

Plugins directory
public string $pluginsDir
Résultat string

$pluginsService protected_oe property

Plugins service
protected Newscoop\Services\Plugins\PluginsService $pluginsService
Résultat Newscoop\Services\Plugins\PluginsService