• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP plugins_path函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中plugins_path函数的典型用法代码示例。如果您正苦于以下问题:PHP plugins_path函数的具体用法?PHP plugins_path怎么用?PHP plugins_path使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了plugins_path函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: onRun

 public function onRun()
 {
     $css = ['assets/css/magnific-popup.css'];
     $js = ['assets/js/jquery.magnific-popup.min.js', 'assets/js/magnific.js'];
     $this->addCss(CombineAssets::combine($css, plugins_path() . '/mohsin/magnificgallery'));
     $this->addJs(CombineAssets::combine($js, plugins_path() . '/mohsin/magnificgallery'));
 }
开发者ID:jamalapriadi,项目名称:righi,代码行数:7,代码来源:Magnific.php


示例2: formCreateModelObject

 /**
  * @return EditorModel
  */
 public function formCreateModelObject()
 {
     $model = new EditorModel();
     $configuration = file_get_contents(plugins_path('adrenth/tinymce/assets/js/default.tinymce.init.js'));
     $model->setAttribute('configuration', $configuration);
     return $model;
 }
开发者ID:adrenth,项目名称:tinymce,代码行数:10,代码来源:Editor.php


示例3: onSignup

 public function onSignup()
 {
     $settings = Settings::instance();
     if (!$settings->api_key) {
         throw new ApplicationException('MailChimp API key is not configured.');
     }
     /*
      * Validate input
      */
     $data = post();
     $rules = ['email' => 'required|email|min:2|max:64'];
     $validation = Validator::make($data, $rules);
     if ($validation->fails()) {
         throw new ValidationException($validation);
     }
     /*
      * Sign up to Mailchimp via the API
      */
     require_once plugins_path() . '/rainlab/mailchimp/vendor/MCAPI.class.php';
     $api = new \MCAPI($settings->api_key);
     $this->page['error'] = null;
     $mergeVars = '';
     if (isset($data['merge']) && is_array($data['merge']) && count($data['merge'])) {
         $mergeVars = $data['merge'];
     }
     if ($api->listSubscribe($this->property('list'), post('email'), $mergeVars) !== true) {
         $this->page['error'] = $api->errorMessage;
     }
 }
开发者ID:jhenahan,项目名称:mailchimp-plugin,代码行数:29,代码来源:Signup.php


示例4: onRun

 public function onRun()
 {
     $css = ['assets/css/magnific-popup.css'];
     $js = ['assets/js/masonry.pkgd.min.js', 'assets/js/magnific-popup.min.js', 'assets/js/magnific-init.js'];
     $this->addCss(CombineAssets::combine($css, plugins_path() . '/umar/masongallery'));
     $this->addJs(CombineAssets::combine($js, plugins_path() . '/umar/masongallery'));
 }
开发者ID:umar-ahmed,项目名称:MasonGallery,代码行数:7,代码来源:MasonGalleryList.php


示例5: fire

 /**
  * Execute the console command.
  */
 public function fire()
 {
     /*
      * Extract the author and name from the plugin code
      */
     $pluginCode = $this->argument('pluginCode');
     $parts = explode('.', $pluginCode);
     $pluginName = array_pop($parts);
     $authorName = array_pop($parts);
     $destinationPath = plugins_path() . '/' . strtolower($authorName) . '/' . strtolower($pluginName);
     $widgetName = $this->argument('widgetName');
     $vars = ['name' => $widgetName, 'author' => $authorName, 'plugin' => $pluginName];
     Widget::make($destinationPath, $vars, $this->option('force'));
     $vars['plugin'] = $vars['name'];
     $langPrefix = strtolower($authorName) . '.' . strtolower($pluginName) . '::lang.';
     $defaultLocale = Lang::getLocale();
     $locales = TranslationScanner::loadPluginLocales();
     foreach ($locales as $locale) {
         Lang::setLocale($locale);
         $vars[$locale] = [$langPrefix . 'plugin.name' => trans('bnb.scaffoldtranslation::lang.defaults.widget.name', ['name' => $pluginName]), $langPrefix . 'plugin.description' => trans('bnb.scaffoldtranslation::lang.defaults.widget.description')];
     }
     Lang::setLocale($defaultLocale);
     TranslationScanner::instance()->with($vars)->scan($destinationPath . '/widgets');
     $this->info(sprintf('Successfully generated Form Widget named "%s"', $widgetName));
 }
开发者ID:keiosweb,项目名称:oc-scaffold-translation-plugin,代码行数:28,代码来源:CreateWidget.php


示例6: getModelatorOptions

 public function getModelatorOptions($keyValue = null)
 {
     $models = $out = [];
     $i = 0;
     $authors = File::directories(plugins_path());
     foreach ($authors as $author) {
         foreach (File::directories($author) as $plugin) {
             foreach (File::files($plugin . DIRECTORY_SEPARATOR . 'models') as $modelFile) {
                 # All links in the LinkCheck plugin table are broken. Skip.
                 $linkCheckPluginPath = plugins_path() . DIRECTORY_SEPARATOR . 'bombozama' . DIRECTORY_SEPARATOR . 'linkcheck';
                 if ($plugin == $linkCheckPluginPath) {
                     continue;
                 }
                 $models[] = Helper::getFullClassNameFromFile((string) $modelFile);
             }
         }
     }
     foreach ($models as $model) {
         $object = new $model();
         foreach (Schema::getColumnListing($object->table) as $column) {
             $type = DB::connection()->getDoctrineColumn($object->table, $column)->getType()->getName();
             if (in_array($type, ['string', 'text'])) {
                 $out[$model . '::' . $column] = $model . '::' . $column;
             }
         }
     }
     return $out;
 }
开发者ID:fuunnx,项目名称:loveandzucchini,代码行数:28,代码来源:Settings.php


示例7: run

 /**
  * Finds and serves the requested backend controller.
  * If the controller cannot be found, returns the Cms page with the URL /404.
  * If the /404 page doesn't exist, returns the system 404 page.
  * @param string $url Specifies the requested page URL.
  * If the parameter is omitted, the current URL used.
  * @return string Returns the processed page content.
  */
 public function run($url = null)
 {
     $params = RouterHelper::segmentizeUrl($url);
     /*
      * Look for a Module controller
      */
     $module = isset($params[0]) ? $params[0] : 'backend';
     $controller = isset($params[1]) ? $params[1] : 'index';
     self::$action = $action = isset($params[2]) ? $this->parseAction($params[2]) : 'index';
     self::$params = $controllerParams = array_slice($params, 3);
     $controllerClass = '\\' . $module . '\\Controllers\\' . $controller;
     if ($controllerObj = $this->findController($controllerClass, $action, base_path() . '/modules')) {
         return $controllerObj->run($action, $controllerParams);
     }
     /*
      * Look for a Plugin controller
      */
     if (count($params) >= 2) {
         list($author, $plugin) = $params;
         $controller = isset($params[2]) ? $params[2] : 'index';
         self::$action = $action = isset($params[3]) ? $this->parseAction($params[3]) : 'index';
         self::$params = $controllerParams = array_slice($params, 4);
         $controllerClass = '\\' . $author . '\\' . $plugin . '\\Controllers\\' . $controller;
         if ($controllerObj = $this->findController($controllerClass, $action, plugins_path())) {
             return $controllerObj->run($action, $controllerParams);
         }
     }
     /*
      * Fall back on Cms controller
      */
     return App::make('Cms\\Classes\\Controller')->run($url);
 }
开发者ID:janusnic,项目名称:23copperleaf,代码行数:40,代码来源:BackendController.php


示例8: fire

 /**
  * Execute the console command.
  * @return void
  */
 public function fire()
 {
     $this->info('Initializing npm, bower and some boilerplates');
     // copiar templates
     $path_source = plugins_path('genius/elixir/assets/template/');
     $path_destination = base_path('/');
     $vars = ['{{theme}}' => Theme::getActiveTheme()->getDirName(), '{{project}}' => str_slug(BrandSettings::get('app_name'))];
     $fileSystem = new Filesystem();
     foreach ($fileSystem->allFiles($path_source) as $file) {
         if (!$fileSystem->isDirectory($path_destination . $file->getRelativePath())) {
             $fileSystem->makeDirectory($path_destination . $file->getRelativePath(), 0777, true);
         }
         $fileSystem->put($path_destination . $file->getRelativePathname(), str_replace(array_keys($vars), array_values($vars), $fileSystem->get($path_source . $file->getRelativePathname())));
     }
     $this->info('... initial setup is ok!');
     $this->info('Installing npm... this can take several minutes!');
     // instalar NPM
     system("cd '{$path_destination}' && npm install");
     $this->info('... node components is ok!');
     $this->info('Installing bower... this will no longer take as!');
     // instalar NPM
     system("cd '{$path_destination}' && bower install");
     $this->info('... bower components is ok!');
     $this->info('Now... edit the /gulpfile.js as you wish and edit your assets at/ resources directory... that\'s is!');
 }
开发者ID:estudiogenius,项目名称:oc-genius-elixir,代码行数:29,代码来源:ElixirInit.php


示例9: run

 public function run()
 {
     $driver = Driver::firstOrCreate(['name' => 'U.S. Postal Service', 'type' => 'shipping', 'class' => 'Bedard\\USPS\\Classes\\USPS', 'is_configurable' => true, 'is_default' => false]);
     $logo = new File();
     $logo->fromFile(plugins_path('bedard/usps/assets/images/usps.png'));
     $logo->save();
     $driver->image()->add($logo);
 }
开发者ID:scottbedard,项目名称:oc-uspsdriver-plugin,代码行数:8,代码来源:install.php


示例10: credentials

 function credentials()
 {
     if (Session::get('ADMINER_AUTOLOGIN') === true) {
         require_once plugins_path() . '/martin/adminer/classes/OctoberAdminerHelper.php';
         $connection = Martin\Adminer\Classes\OctoberAdminerHelper::getAutologinParams();
         if ($connection['driver'] == 'mysql') {
             return [$server, $connection['username'], $connection['password']];
         }
     }
 }
开发者ID:JohnathanBere,项目名称:5aSideGDP,代码行数:10,代码来源:adminer-loader.php


示例11: fire

 /**
  * Execute the console command.
  * @return void
  */
 public function fire()
 {
     $base_path = base_path('');
     $this->info('Dependencies installing begins here! (plugin:install)');
     // DEPENDENCIES
     foreach (['RainLab.Translate', 'Flynsarmy.IdeHelper', 'BnB.ScaffoldTranslation', 'October.Drivers', 'RainLab.GoogleAnalytics', 'Genius.StorageClear'] as $required) {
         $this->info('Installing: ' . $required);
         Artisan::call("plugin:install", ['name' => $required]);
     }
     $this->info('Dependencies installed!');
     // THEME
     $this->info('Installing: oc-genius-theme');
     system("cd '{$base_path}' && git clone https://github.com/estudiogenius/oc-genius-theme themes/genius");
     Theme::setActiveTheme('genius');
     // ELIXIR
     $this->info('Installing: oc-genius-elixir');
     system("cd '{$base_path}' && git clone https://github.com/estudiogenius/oc-genius-elixir plugins/genius/elixir");
     // FORMS
     $this->info('Installing: oc-genius-forms');
     system("cd '{$base_path}' && git clone https://github.com/estudiogenius/oc-genius-forms plugins/genius/forms");
     // BACKUP
     $this->info('Installing: oc-genius-backup');
     system("cd '{$base_path}' && git clone https://github.com/estudiogenius/oc-genius-backup plugins/genius/backup");
     // GOOGLE ANALYTICS
     $this->info('Initial setup: AnalytcsSettings');
     if (!AnalytcsSettings::get('project_name')) {
         AnalytcsSettings::create(['project_name' => 'API Project', 'client_id' => '979078159189-8afk8nn2las4vk1krbv8t946qfk540up.apps.googleusercontent.com', 'app_email' => '979078159189-8afk8nn2las4vk1krbv8t946qfk540up@developer.gserviceaccount.com', 'profile_id' => '112409305', 'tracking_id' => 'UA-29856398-24', 'domain_name' => 'retrans.srv.br'])->gapi_key()->add(File::create(['data' => plugins_path('genius/base/assets/genius-analytics.p12')]));
     }
     // EMAIL
     $this->info('Initial setup: MailSettings');
     if (!MailSettings::get('mandrill_secret')) {
         MailSettings::create(['send_mode' => 'mandrill', 'sender_name' => 'Genius Soluções Web', 'sender_email' => '[email protected]', 'mandrill_secret' => 't27R2C15NPnZ8tzBrIIFTA']);
     }
     // BRAND
     $this->info('Initial setup: BrandSettings');
     if (!BrandSettings::get('app_init')) {
         BrandSettings::create(['app_name' => 'Genius Soluções Web', 'app_tagline' => 'powered by Genius', "primary_color_light" => "#e67e22", "primary_color_dark" => "#d35400", "secondary_color_light" => "#34495e", "secondary_color_dark" => "#2b3e50", "custom_css" => "", 'app_init' => true])->logo()->add(File::create(['data' => plugins_path('genius/base/assets/genius-logo.png')]));
     }
     // USUARIO BASE
     $this->info('Initial setup: User');
     $user = User::find(1);
     if (!$user->last_name) {
         $user->update(['first_name' => 'Genius', 'last_name' => 'Soluções Web', 'login' => 'genius', 'email' => '[email protected]', 'password' => 'genius', 'password_confirmation' => 'genius']);
         $user->avatar()->add(File::create(['data' => plugins_path('genius/base/assets/genius-avatar.jpg')]));
     }
     $this->info('Genius.Base is ready to rock!');
     $this->info('');
     $this->info('For Laravel Elixir setup run: php artisan elixir:init');
 }
开发者ID:estudiogenius,项目名称:oc-genius-base,代码行数:53,代码来源:GeniusInit.php


示例12: fire

 /**
  * Execute the console command.
  */
 public function fire()
 {
     /*
      * Extract the author and name from the plugin code
      */
     $pluginCode = $this->argument('pluginCode');
     $parts = explode('.', $pluginCode);
     $pluginName = array_pop($parts);
     $authorName = array_pop($parts);
     $destinationPath = plugins_path() . '/' . strtolower($authorName) . '/' . strtolower($pluginName);
     $widgetName = $this->argument('widgetName');
     $vars = ['name' => $widgetName, 'author' => $authorName, 'plugin' => $pluginName];
     FormWidget::make($destinationPath, $vars, $this->option('force'));
     $this->info(sprintf('Successfully generated Form Widget named "%s"', $widgetName));
 }
开发者ID:brenodouglas,项目名称:library,代码行数:18,代码来源:CreateFormWidget.php


示例13: extendFormFields

 /**
  * Extend the CMS form fields
  *
  * @param   Form        $form
  */
 public static function extendFormFields(Form $form)
 {
     // Add a hidden field for the campaign id
     if ($campaign = Campaign::whereCmsObject($form)->first()) {
         $form->secondaryTabs['fields']['splitter[id]'] = ['tab' => 'bedard.splitter::lang.campaigns.cmsTab', 'default' => $campaign->id, 'cssClass' => 'hidden'];
         $form->model->splitter = $campaign->toArray();
     }
     // Add the remaining fields from our campaign form definition
     $yaml = new Yaml();
     $content = $yaml->parseFile(plugins_path('bedard/splitter/models/campaign/fields.yaml'));
     $fields = $content['secondaryTabs']['fields'];
     foreach ($fields as $key => $fieldData) {
         if ($fieldData['showOnCms']) {
             $fieldData['tab'] = 'bedard.splitter::lang.campaigns.cmsTab';
             $fieldData['cssClass'] = 'cms-field-padding';
             $form->secondaryTabs['fields']['splitter[' . $key . ']'] = $fieldData;
         }
     }
 }
开发者ID:scottbedard,项目名称:oc-splitter-plugin,代码行数:24,代码来源:CmsHelper.php


示例14: boot

 public function boot()
 {
     \Backend\Controllers\Auth::extend(function ($controller) {
         if (\Backend\Classes\BackendController::$action == 'signin') {
             if (Settings::get('google_button') == 'light') {
                 $CSS[] = 'ssologin-light.css';
             } else {
                 $CSS[] = 'ssologin.css';
             }
             if (Settings::get('hide_login_fields') == 1) {
                 $CSS[] = 'hide-login.css';
             }
             $controller->addCss(CombineAssets::combine($CSS, plugins_path() . '/martin/ssologin/assets/css/'));
         }
     });
     Event::listen('backend.auth.extendSigninView', function ($controller) {
         return View::make("martin.ssologin::login");
     });
 }
开发者ID:skydiver,项目名称:october-plugin-ssologin,代码行数:19,代码来源:Plugin.php


示例15: onRender

 public function onRender()
 {
     $css = ['assets/vendor/photoswipe/photoswipe.css', 'assets/vendor/photoswipe/default-skin/default-skin.css'];
     $js = ['assets/vendor/photoswipe/photoswipe.js', 'assets/vendor/photoswipe/photoswipe-ui-default.js', 'assets/js/performance-gallery.js'];
     $this->addCss(CombineAssets::combine($css, plugins_path() . '/abnmt/photoswipe'));
     $this->addJs(CombineAssets::combine($js, plugins_path() . '/abnmt/photoswipe'));
     $gallery = $this->property('images');
     if (!is_null($gallery)) {
         $gallery->each(function ($image) {
             $image['sizes'] = getimagesize('./' . $image->getPath());
             if ($image['sizes'][0] < $image['sizes'][1]) {
                 $image['thumb'] = $image->getThumb(177, null);
             } else {
                 $image['thumb'] = $image->getThumb(null, 177);
             }
         });
     }
     $this->gallery = $this->page['gallery'] = $gallery;
 }
开发者ID:abnmt,项目名称:oc-photoswipe-plugin,代码行数:19,代码来源:Gallery.php


示例16: getDir

 /**
  * Get the full path to the PageFields dir
  *
  * @return [string] Path
  */
 private function getDir()
 {
     return plugins_path('jofry/fields/fields/');
 }
开发者ID:bauwils,项目名称:jacobhair,代码行数:9,代码来源:PageFields.php


示例17: getLayouts

 public static function getLayouts()
 {
     $layouts = [];
     foreach (Filesystem::files(Theme::getActiveTheme()->getPath() . '/partials/' . self::$componentName) as $layout) {
         if (basename($layout) == 'galleries.css') {
             continue;
         }
         if (basename($layout) == 'default.htm') {
             continue;
         }
         $name = basename(substr($layout, 0, strrpos($layout, '.')));
         if (!isset($layouts[$name])) {
             $layouts[$name] = $name;
         }
     }
     foreach (Filesystem::files(plugins_path() . '/nsrosenqvist/baguettegallery/components/baguettegallery/') as $layout) {
         if (basename($layout) == 'default.htm') {
             continue;
         }
         $name = basename(substr($layout, 0, strrpos($layout, '.')));
         if (!isset($layouts[$name])) {
             $layouts[$name] = $name;
         }
     }
     return $layouts;
 }
开发者ID:nsrosenqvist,项目名称:october-plugin_baguettegallery,代码行数:26,代码来源:Baguette.php


示例18: createPluginPath

 /**
  * Creates full plugin path from plugin code
  *
  * @param string $code
  *
  * @returns string
  */
 protected final function createPluginPath($code)
 {
     $parts = explode('.', $code);
     $parts = array_map(function ($part) {
         return strtolower($part);
     }, $parts);
     list($vendor, $plugin) = $parts;
     return plugins_path() . '/' . $vendor . '/' . $plugin;
 }
开发者ID:justin-lau,项目名称:oc-plugin-testsuite,代码行数:16,代码来源:OctoberPluginTestCase.php


示例19: getVendorAndPluginNames

 /**
  * Returns a 2 dimensional array of vendors and their plugins.
  */
 public function getVendorAndPluginNames()
 {
     $plugins = [];
     $dirPath = plugins_path();
     if (!File::isDirectory($dirPath)) {
         return $plugins;
     }
     $it = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dirPath, RecursiveDirectoryIterator::FOLLOW_SYMLINKS));
     $it->setMaxDepth(2);
     $it->rewind();
     while ($it->valid()) {
         if ($it->getDepth() > 1 && $it->isFile() && strtolower($it->getFilename()) == "plugin.php") {
             $filePath = dirname($it->getPathname());
             $pluginName = basename($filePath);
             $vendorName = basename(dirname($filePath));
             $plugins[$vendorName][$pluginName] = $filePath;
         }
         $it->next();
     }
     return $plugins;
 }
开发者ID:betes-curieuses-design,项目名称:ElieJosiePhotographie,代码行数:24,代码来源:PluginManager.php


示例20: getPath

 /**
  * Returns the absolute component path.
  */
 public function getPath()
 {
     return plugins_path() . $this->dirName;
 }
开发者ID:janusnic,项目名称:23copperleaf,代码行数:7,代码来源:ComponentBase.php



注:本文中的plugins_path函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP plugins_url函数代码示例发布时间:2022-05-15
下一篇:
PHP plugins_installed函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap