Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TASK] Improve documentation for extension commands #205

Merged
merged 1 commit into from
Jun 28, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
71 changes: 28 additions & 43 deletions Classes/Command/ExtensionCommandController.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,52 +29,30 @@ class ExtensionCommandController extends CommandController

/**
* @var \TYPO3\CMS\Extbase\SignalSlot\Dispatcher
* @inject
*/
protected $signalSlotDispatcher;

/**
* @var \TYPO3\CMS\Extensionmanager\Utility\InstallUtility
* @inject
*/
protected $extensionInstaller;

/**
* @var \TYPO3\CMS\Core\Package\PackageManager
* @inject
*/
protected $packageManager;

/**
* @param \TYPO3\CMS\Extbase\SignalSlot\Dispatcher $signalSlotDispatcher
*/
public function injectSignalSlotDispatcher(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher $signalSlotDispatcher)
{
$this->signalSlotDispatcher = $signalSlotDispatcher;
}

/**
* @param \TYPO3\CMS\Extensionmanager\Utility\InstallUtility $extensionInstaller
*/
public function injectExtensionInstaller(\TYPO3\CMS\Extensionmanager\Utility\InstallUtility $extensionInstaller)
{
$this->extensionInstaller = $extensionInstaller;
}

/**
* @param \TYPO3\CMS\Core\Package\PackageManager $packageManager
*/
public function injectPackageManager(\TYPO3\CMS\Core\Package\PackageManager $packageManager)
{
$this->packageManager = $packageManager;
}

/**
* Activate extension(s).
*
* Activates one or more extensions by key.
* Marks extensions as active, sets them up and clears caches for every activated extension.
*
* The extension files must be present in one of the
* recognised extension folder paths in TYPO3.
*
* @param array $extensionKeys Array of extension keys to activate, on CLI specified as a list of CSV values
* @param array $extensionKeys Extension keys to activate. Separate multiple extension keys with comma.
* @throws \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException
*/
public function activateCommand(array $extensionKeys)
{
Expand All @@ -91,16 +69,13 @@ public function activateCommand(array $extensionKeys)
}

/**
* Deactivate extension(s)
*
* Deactivates one or more extensions by key
* Deactivate extension(s).
*
* The extension files must be present in one of the
* recognised extension folder paths in TYPO3.
*
* @param array $extensionKeys Array of extension keys to deactivate, on CLI specified as a list of CSV values
* @return void
* Deactivates one or more extensions by key.
* Marks extensions as inactive in the system and clears caches for every deactivated extension.
*
* @param array $extensionKeys Extension keys to deactivate. Separate multiple extension keys with comma.
* @throws \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException
*/
public function deactivateCommand(array $extensionKeys)
{
Expand All @@ -116,16 +91,16 @@ public function deactivateCommand(array $extensionKeys)
}

/**
* Setup extension(s)
* Set up extension(s)
*
* Sets up one or more extensions by key.
*
* Set up means:
* * Database migrations and additions
* * Importing files and data
* * Writing default extension configuration
*
* @param array $extensionKeys
* - Database migrations and additions
* - Importing files and data
* - Writing default extension configuration
*
* @param array $extensionKeys Extension keys to set up. Separate multiple extension keys with comma.
*/
public function setupCommand(array $extensionKeys)
{
Expand All @@ -143,7 +118,17 @@ public function setupCommand(array $extensionKeys)
/**
* Set up all active extensions
*
* Sets up all extension that are active and not part of typo3/cms package
* Sets up all extensions that are marked as active in the system.
*
* This command is especially useful for deployment, where extensions
* are already marked as active, but have not been set up yet or might have changed. It ensures every necessary
* setup step for the (changed) extensions is performed.
* As an additional benefit no caches are flushed, which significantly improves performance of this command
* and avoids unnecessary cache clearing.
*
* @see extensionmanager:extension:setup
* @see typo3_console:install:generatepackagestates
* @see typo3_console:cache:flush
*/
public function setupActiveCommand()
{
Expand Down
48 changes: 30 additions & 18 deletions Documentation/CommandReference/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Command Reference
instead.


The following reference was automatically generated from code on 2016-06-21 22:24:35
The following reference was automatically generated from code on 2016-06-28 09:20:43


.. _`Command Reference: typo3_console`:
Expand Down Expand Up @@ -513,15 +513,13 @@ Options
**Activate extension(s).**

Activates one or more extensions by key.

The extension files must be present in one of the
recognised extension folder paths in TYPO3.
Marks extensions as active, sets them up and clears caches for every activated extension.

Arguments
^^^^^^^^^

``--extension-keys``
Array of extension keys to activate, on CLI specified as a list of CSV values
Extension keys to activate. Separate multiple extension keys with comma.



Expand All @@ -534,18 +532,16 @@ Arguments
``extension:deactivate``
************************

**Deactivate extension(s)**

Deactivates one or more extensions by key
**Deactivate extension(s).**

The extension files must be present in one of the
recognised extension folder paths in TYPO3.
Deactivates one or more extensions by key.
Marks extensions as inactive in the system and clears caches for every deactivated extension.

Arguments
^^^^^^^^^

``--extension-keys``
Array of extension keys to deactivate, on CLI specified as a list of CSV values
Extension keys to deactivate. Separate multiple extension keys with comma.



Expand Down Expand Up @@ -576,20 +572,20 @@ creating or updating this info properly during extension (de-)activation.
``extension:setup``
*******************

**Setup extension(s)**
**Set up extension(s)**

Sets up one or more extensions by key.

Set up means:
* Database migrations and additions
* Importing files and data
* Writing default extension configuration

- Database migrations and additions
- Importing files and data
- Writing default extension configuration

Arguments
^^^^^^^^^

``--extension-keys``

Extension keys to set up. Separate multiple extension keys with comma.



Expand All @@ -604,11 +600,27 @@ Arguments

**Set up all active extensions**

Sets up all extension that are active and not part of typo3/cms package
Sets up all extensions that are marked as active in the system.

This command is especially useful for deployment, where extensions
are already marked as active, but have not been set up yet or might have changed. It ensures every necessary
setup step for the (changed) extensions is performed.
As an additional benefit no caches are flushed, which significantly improves performance of this command
and avoids unnecessary cache clearing.





Related commands
^^^^^^^^^^^^^^^^

``extension:setup``
Set up extension(s)
``install:generatepackagestates``
Generate PackageStates.php file.
``cache:flush``
Flush all caches.



Expand Down