Method | Description | |
---|---|---|
getPluginPath ( $pluginName ) | ||
isEnabled ( ) |
Method | Description | |
---|---|---|
askPluginNameAndValidate ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output, $pluginNames, $invalidArgumentException ) : array | ||
checkAndUpdateRequiredPiwikVersion ( $pluginName, Symfony\Component\Console\Output\OutputInterface $output ) | ||
copyTemplateMethodToExisitingClass ( string $sourceClassName, string $methodName, array $replace ) | Copies the given method and all needed use statements into an existing class. The target class name will be built based on the given $replace argument. | |
copyTemplateToPlugin ( string $templateFolder, string $pluginName, array $replace = [], array $whitelistFiles = [] ) | ||
createFileWithinPluginIfNotExists ( $pluginNameOrCore, $fileName, $content ) | ||
getPluginNames ( ) | ||
getPluginNamesHavingNotSpecificFile ( $filename ) | ||
makeTranslationIfPossible ( $pluginName, $translatedText ) : string | Creates a lang/en.json within the plugin in case it does not exist yet and adds a translation for the given text. |
Method | Description | |
---|---|---|
buildTranslationKey ( $translatedText ) | ||
createFolderWithinPluginIfNotExists ( $pluginNameOrCore, $folder ) | ||
getPathToCore ( ) | ||
getRelativePluginPath ( $pluginName ) | ||
removeNonJsonCompatibleCharacters ( $text ) | ||
replaceContent ( $replace, $contentToReplace ) | ||
toJson ( $value ) |
protected askPluginNameAndValidate ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output, $pluginNames, $invalidArgumentException ) : array | ||
$input | Symfony\Component\Console\Input\InputInterface | |
$output | Symfony\Component\Console\Output\OutputInterface | |
return | array |
protected checkAndUpdateRequiredPiwikVersion ( $pluginName, Symfony\Component\Console\Output\OutputInterface $output ) | ||
$output | Symfony\Component\Console\Output\OutputInterface |
protected copyTemplateToPlugin ( string $templateFolder, string $pluginName, array $replace = [], array $whitelistFiles = [] ) | ||
$templateFolder | string | full path like /home/... |
$pluginName | string | |
$replace | array | array(key => value) $key will be replaced by $value in all templates |
$whitelistFiles | array | If not empty, only given files/directories will be copied. For instance array('/Controller.php', '/templates', '/templates/index.twig') |
protected createFileWithinPluginIfNotExists ( $pluginNameOrCore, $fileName, $content ) |
protected getPluginNamesHavingNotSpecificFile ( $filename ) |
protected makeTranslationIfPossible ( $pluginName, $translatedText ) : string | ||
$pluginName | ||
$translatedText | ||
return | string | Either the generated translation key or the original text if a different translation for this generated translation key already exists. |