Back to ExtensionsListCommand class

Method setExtensions

public void
setExtensions
(mixed $extensions = null)
Retrieves the extension from the model and sets the class variable
Parameters
  • null $extensions Array of extensions
Returns
  • void
Since
  • 4.0.0

Method setExtensions - Source code

/**
 * Retrieves the extension from the model and sets the class variable
 *
 * @param   null  $extensions  Array of extensions
 *
 * @return void
 *
 * @since 4.0.0
 */
public function setExtensions($extensions = null) : void
{
    if (!$extensions) {
        $this->extensions = $this->getAllExtensionsFromDB();
    } else {
        $this->extensions = $extensions;
    }
}