本文整理汇总了PHP中Installer::getRootDirTheme方法的典型用法代码示例。如果您正苦于以下问题:PHP Installer::getRootDirTheme方法的具体用法?PHP Installer::getRootDirTheme怎么用?PHP Installer::getRootDirTheme使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Installer
的用法示例。
在下文中一共展示了Installer::getRootDirTheme方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: add
public static function add()
{
parent::add();
self::$facebook_app_id = Installer::getComposerEvent()->getIO()->ask(":: enter your facebook app id: ", "[app_id]");
self::$facebook_api_secret = Installer::getComposerEvent()->getIO()->ask(":: enter your facebook app secret: ", "[app_secret]");
File::replaceContent(Installer::getRootDirConfig() . self::getConfigfile(), "[app_id]", self::getFacebookAppId());
File::replaceContent(Installer::getRootDirConfig() . self::getConfigfile(), "[api_secret]", self::getFacebookApiSecret());
File::addContent(Installer::getRootDirTheme() . "Includes/Footer.ss", "<% include FacebookLoginLink %>", "SilverStripe</a></small>");
Installer::getComposerEvent()->getIO()->write(":: added facebookconnect extension");
}
示例2: add
/**
* copy customized extension.yml, classes and templates to silverstripe project which should be availible as skelet
*/
public static function add()
{
File::copy(Installer::getRootDirVendor() . static::getExtension(), Installer::getRootDirConfig());
Installer::getComposerEvent()->getIO()->write(":: copied " . self::getConfigfile());
foreach (static::getClasses() as $folder => $class) {
File::copy(Installer::getRootDirVendor() . $class, Installer::getRootDirCode() . $folder . "/");
Installer::getComposerEvent()->getIO()->write(":: added class {$class}");
}
foreach (static::getTemplates() as $folder => $template) {
File::copy(Installer::getRootDirVendor() . $template, Installer::getRootDirTheme() . $folder . "/");
Installer::getComposerEvent()->getIO()->write(":: added template {$template}");
}
}