PHP 클래스 Piwik\Plugins\CoreConsole\Commands\GeneratePluginBase

상속: extends Piwik\Plugin\ConsoleCommand
파일 보기 프로젝트 열기: piwik/piwik 1 사용 예제들

공개 메소드들

메소드 설명
getPluginPath ( $pluginName )
isEnabled ( )

보호된 메소드들

메소드 설명
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.

비공개 메소드들

메소드 설명
buildTranslationKey ( $translatedText )
createFolderWithinPluginIfNotExists ( $pluginNameOrCore, $folder )
getPathToCore ( )
getRelativePluginPath ( $pluginName )
removeNonJsonCompatibleCharacters ( $text )
replaceContent ( $replace, $contentToReplace )
toJson ( $value )

메소드 상세

askPluginNameAndValidate() 보호된 메소드

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
리턴 array

checkAndUpdateRequiredPiwikVersion() 보호된 메소드

protected checkAndUpdateRequiredPiwikVersion ( $pluginName, Symfony\Component\Console\Output\OutputInterface $output )
$output Symfony\Component\Console\Output\OutputInterface

copyTemplateMethodToExisitingClass() 보호된 메소드

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.
protected copyTemplateMethodToExisitingClass ( string $sourceClassName, string $methodName, array $replace )
$sourceClassName string
$methodName string
$replace array

copyTemplateToPlugin() 보호된 메소드

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')

createFileWithinPluginIfNotExists() 보호된 메소드

protected createFileWithinPluginIfNotExists ( $pluginNameOrCore, $fileName, $content )

getPluginNames() 보호된 메소드

protected getPluginNames ( )

getPluginNamesHavingNotSpecificFile() 보호된 메소드

protected getPluginNamesHavingNotSpecificFile ( $filename )

getPluginPath() 공개 메소드

public getPluginPath ( $pluginName )

isEnabled() 공개 메소드

public isEnabled ( )

makeTranslationIfPossible() 보호된 메소드

Creates a lang/en.json within the plugin in case it does not exist yet and adds a translation for the given text.
protected makeTranslationIfPossible ( $pluginName, $translatedText ) : string
$pluginName
$translatedText
리턴 string Either the generated translation key or the original text if a different translation for this generated translation key already exists.