当前位置: 首页>>代码示例>>PHP>>正文


PHP ffContainer函数代码示例

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


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

示例1: createUser

 public function createUser()
 {
     $this->_getClassloader()->loadClass('ffUser');
     $user = new ffUser();
     $user->setWPLayer(ffContainer()->getWPLayer());
     return $user;
 }
开发者ID:migumuno,项目名称:nordicainteriores,代码行数:7,代码来源:class.ffUserFactory.php

示例2: getImageHttpManager

 public function getImageHttpManager()
 {
     $this->_getClassloader()->loadClass('ffImageHttpManager');
     $container = ffContainer();
     $imageHttpManager = new ffImageHttpManager($container->getWPLayer(), $container->getHttpAction(), $container->getGraphicFactory()->getImageServingObject(), $container->getFileSystem());
     return $imageHttpManager;
 }
开发者ID:migumuno,项目名称:nordicainteriores,代码行数:7,代码来源:class.ffGraphicFactory.php

示例3: getUserModel

 public function getUserModel()
 {
     $this->_getClassloader()->loadClass('ffUserModel');
     $userFactory = $this->getUserFactory();
     $userModel = new ffUserModel($userFactory, ffContainer()->getCiphers());
     return $userModel;
 }
开发者ID:migumuno,项目名称:nordicainteriores,代码行数:7,代码来源:class.ffUserNamespaceFactory.php

示例4: getShortcodeFactory

 public function getShortcodeFactory()
 {
     $this->_getClassloader()->loadClass('ffShortcodeObjectBasic');
     $this->_getClassloader()->loadClass('ffShortcodeFactory');
     $scFactory = new ffShortcodeFactory($this->_getClassloader());
     $scFactory->setWPLayer(ffContainer()->getWPLayer());
     return $scFactory;
 }
开发者ID:migumuno,项目名称:nordicainteriores,代码行数:8,代码来源:class.ffShortcodesNamespaceFactory.php

示例5: _initMetaBox

 protected function _initMetaBox()
 {
     $themeLayoutManager = ffContainer()->getThemeFrameworkFactory()->getLayoutsNamespaceFactory()->getThemeLayoutManager();
     $this->_addPostType($themeLayoutManager->getLayoutPostTypeName());
     $this->_setTitle('Layout Placement');
     $this->_setContext(ffMetaBox::CONTEXT_SIDE);
     $this->_setParam(ffMetaBox::PARAM_NORMALIZE_OPTIONS, true);
 }
开发者ID:migumuno,项目名称:nordicainteriores,代码行数:8,代码来源:class.ffMetaBoxLayoutPlacement.php

示例6: _initMetaBox

 protected function _initMetaBox()
 {
     $themeLayoutManager = ffContainer()->getThemeFrameworkFactory()->getLayoutsNamespaceFactory()->getThemeLayoutManager();
     $this->_addPostType($themeLayoutManager->getLayoutPostTypeName());
     $this->_setTitle('Layout');
     $this->_setContext(ffMetaBox::CONTEXT_NORMAL);
     $this->_setParam(ffMetaBox::PARAM_NORMALIZE_OPTIONS, true);
     //$this->_addVisibility( ffMetaBox::VISIBILITY_PAGE_TEMPLATE, 'page-onepage.php');
 }
开发者ID:migumuno,项目名称:nordicainteriores,代码行数:9,代码来源:class.ffMetaBoxLayoutContent.php

示例7: ff_load_section_printer

 function ff_load_section_printer($sectionName, ffOptionsQuery $query, $params = array(), $isFirstLevel = false)
 {
     //loop-influence-portfolio-block
     $fileSystem = ffContainer()->getFileSystem();
     $relativePath = ff_get_section_path($sectionName);
     $absolutePath = $fileSystem->locateFileInChildTheme($relativePath);
     if ($query->queryExists('section-settings') && $isFirstLevel) {
         ff_print_before_section($query->get('section-settings'));
     }
     if (($query->queryExists('loop-influence-portfolio-block') || $query->queryExists('loop-influence-post-block')) && !is_search() && !is_archive() && !(is_home() && is_front_page())) {
         if ($query->queryExists('loop-influence-portfolio-block')) {
             $taxonomyIds = $query->get('loop-influence-portfolio-block')->getMultipleSelect('categories');
             $taxType = 'ff-portfolio-category';
             $postType = 'portfolio';
         } else {
             $taxonomyIds = $query->get('loop-influence-post-block')->getMultipleSelect('categories');
             $postType = 'post';
             $taxType = 'category';
         }
         $args = array('post_type' => $postType);
         $taxonomies = $taxonomyIds;
         if (1 == count($taxonomies)) {
             if (isset($taxonomies[0]) and empty($taxonomies[0])) {
                 $taxonomies = null;
             }
         }
         if (!empty($taxonomies)) {
             $args['tax_query'] = array();
             if (1 < count($taxonomies)) {
                 $args['tax_query']['relation'] = 'OR';
             }
             foreach ($taxonomies as $tax_ID) {
                 $args['tax_query'][] = array('taxonomy' => $taxType, 'field' => 'id', 'terms' => absint($tax_ID));
             }
         }
         global $wp_query;
         $backuped_main_query = clone $wp_query;
         $wp_query = new WP_Query($args);
     }
     if ($fileSystem->fileExists($absolutePath)) {
         require $absolutePath;
     } else {
         throw new Exception('Failed to include section:' . $relativePath);
     }
     // if( ($query->queryExists('loop-influence-portfolio-block') || $query->queryExists('loop-influence-post-block')) && !is_archive() ) {
     if (!empty($backuped_main_query)) {
         global $wp_query;
         $wp_query = $backuped_main_query;
     }
     if ($query->queryExists('section-settings') && $isFirstLevel) {
         ff_print_after_section($query->get('section-settings'));
     }
     if (isset($dataToReturn)) {
         return $dataToReturn;
     }
     return null;
 }
开发者ID:migumuno,项目名称:nordicainteriores,代码行数:57,代码来源:sections.php

示例8: createBreadcrumbs

 public function createBreadcrumbs()
 {
     $this->_getClassloader()->loadClass('ffBreadcrumbsCollectionFactory');
     $this->_getClassloader()->loadClass('ffOneBreadcrumbFactory');
     $breadcrumbsFactory = new ffBreadcrumbsCollectionFactory($this->_getClassloader());
     $oneBreadcrumbFactory = new ffOneBreadcrumbFactory($this->_getClassloader());
     $this->_getClassloader()->loadClass('ffBreadcrumbs');
     $breadcrumbs = new ffBreadcrumbs($breadcrumbsFactory->createBreadcrumbsCollection(), $oneBreadcrumbFactory, ffContainer()->getWPLayer(), ffContainer()->getFrontendQueryIdentificator(), ffContainer()->getCustomTaxonomyIdentificator());
     return $breadcrumbs;
 }
开发者ID:migumuno,项目名称:nordicainteriores,代码行数:10,代码来源:class.ffLibManager.php

示例9: createAdminScreen

 /**
  * 
  * @param unknown $adminScreenClassName
  * @return ffIAdminScreen
  */
 public function createAdminScreen($adminScreenClassName)
 {
     $this->_getClassloader()->loadClass('ffIAdminScreen');
     if ($this->_getClassloader()->classRegistered($adminScreenClassName)) {
         $this->_getClassloader()->loadClass($adminScreenClassName);
         $request = ffContainer()->getRequest();
         $adminScreenClassInstance = new $adminScreenClassName($this->_getMenuFactory(), $this->_getAdminScreenViewFactory(), $request);
         return $adminScreenClassInstance;
     } else {
         throw new Exception('AdminScreenFactory -> Trying to create class ' . $adminScreenClassName . ', but it does not exists!');
     }
     return false;
 }
开发者ID:migumuno,项目名称:nordicainteriores,代码行数:18,代码来源:class.ffAdminScreenFactory.php

示例10: _save

 protected function _save($postId)
 {
     return;
     $fwc = ffContainer::getInstance();
     $layoutsDataManager = ffContainer()->getThemeFrameworkFactory()->getLayoutsNamespaceFactory()->getLayoutsDataManager();
     $collection = $layoutsDataManager->getLayoutCollection();
     $item = $collection->getLayoutById($postId);
     $options = $fwc->getOptionsFactory()->createOptionsHolder('ffOptionsHolder_Layout_Conditions')->getOptions();
     $postReader = $fwc->getOptionsFactory()->createOptionsPostReader($options);
     $value = $postReader->getData('conditions');
     $item->setConditional($value);
     //        $layoutsDataManager->saveLayoutCollection();
 }
开发者ID:migumuno,项目名称:nordicainteriores,代码行数:13,代码来源:class.ffMetaBoxLayoutConditionsView.php

示例11: getLayoutsDataManager

 public function getLayoutsDataManager()
 {
     if ($this->_ldm == null) {
         $this->_getClassloader()->loadClass('ffLayoutsDataManager');
         if (defined('ffThemeContainer::THEME_NAME_LOW')) {
             $themeName = ffThemeContainer::THEME_NAME_LOW;
         } else {
             $themeName = 'universal-layout';
         }
         $dataStorage = ffContainer()->getDataStorageFactory()->createDataStorageOptionsPostType_NamespaceFacade();
         $this->_ldm = new ffLayoutsDataManager($this->getLayoutsCollectionFactory(), $themeName, $dataStorage, ffContainer()->getDataStorageFactory());
     }
     return $this->_ldm;
 }
开发者ID:migumuno,项目名称:nordicainteriores,代码行数:14,代码来源:class.ffLayoutsNamespaceFactory.php

示例12: _render

 protected function _render($post)
 {
     $layoutsDataManager = ffContainer()->getThemeFrameworkFactory()->getLayoutsNamespaceFactory()->getLayoutsDataManager();
     $collection = $layoutsDataManager->getLayoutCollection();
     $item = $collection->getLayoutById($post->ID);
     $fwc = ffContainer::getInstance();
     $fwc->getWPLayer()->add_action('admin_footer', array($this, 'requireModalWindows'), 1);
     $s = $fwc->getOptionsFactory()->createOptionsHolder('ffOptionsHolder_Layout_Placement')->getOptions();
     //createStructure('portfolio');
     $value = $item->getPlacement();
     //$fwc->getDataStorageFactory()->createDataStorageOptionsPostType_NamespaceFacade(ffThemeContainer::THEME_NAME_LOW.'-layouts', true)->getOptionCoded('placements');
     $printer = $fwc->getOptionsFactory()->createOptionsPrinterBoxed($value, $s);
     $printer->setNameprefix('placement');
     $printer->walk();
 }
开发者ID:migumuno,项目名称:nordicainteriores,代码行数:15,代码来源:class.ffMetaBoxLayoutPlacementView.php

示例13: actResizeAndServeImage

 public function actResizeAndServeImage($parameters)
 {
     if (!isset($parameters['image_name'])) {
         return false;
     }
     $imageOptionName = $parameters['image_name'];
     $imageData = $this->_getWPLayer()->get_option($imageOptionName);
     if ($imageData == null) {
         die;
     }
     $this->_getWPLayer()->delete_option($imageOptionName);
     ffContainer()->getClassLoader()->loadClass('externFreshizer');
     $newUrl = fImg::resize($imageData['url'], $imageData['width'], $imageData['height'], $imageData['crop'], false, false);
     $path = $this->_getFileSystem()->findFileFromUrl($newUrl);
     $this->_getImageServingObject()->serveImage($path);
 }
开发者ID:migumuno,项目名称:nordicainteriores,代码行数:16,代码来源:class.ffImageHttpManager.php

示例14: printComponent

 public function printComponent($args, ffOptionsQuery $query)
 {
     $categories = $query->getMultipleSelect('latest-news categories');
     $numberOfPosts = $query->get('latest-news number-of-posts');
     $postGetter = ffContainer()->getPostLayer()->getPostGetter();
     $posts = $postGetter->setFilterRelation_OR()->setNumberOfPosts($numberOfPosts)->filterByCategory($categories)->getAllPosts();
     echo $args['before_widget'];
     echo $args['before_title'];
     echo ff_wp_kses($query->get('latest-news title'));
     echo $args['after_title'];
     echo '<ul';
     if ('alt' == $query->get('latest-news style')) {
         echo ' class="alt"';
     }
     echo '>';
     if ('alt' == $query->get('latest-news style')) {
         foreach ($posts as $onePost) {
             $featuredImageUrl = $onePost->getFeaturedImage();
             if (empty($featuredImageUrl)) {
                 continue;
             }
             $featuredImageUrlResized = fImg::resize($featuredImageUrl, 65, 65, true);
             echo '<li>';
             echo '<img src="' . esc_url($featuredImageUrlResized) . '" alt="">';
             echo '<a href="' . get_permalink($onePost->getID()) . '" class="post-title">' . ff_wp_kses($onePost->getTitle()) . '</a>';
             echo '<p class="post-date">' . ff_wp_kses($onePost->getDateFormated('F d, Y')) . '</p>';
             echo '</li>';
         }
     } else {
         foreach ($posts as $onePost) {
             $featuredImageUrl = $onePost->getFeaturedImage();
             if (empty($featuredImageUrl)) {
                 continue;
             }
             $featuredImageUrlResized = fImg::resize($featuredImageUrl, 80, 80, true);
             echo '<li>';
             echo '<img src="' . esc_url($featuredImageUrlResized) . '" alt="">';
             echo '<p class="news-title">';
             echo '<a href="' . get_permalink($onePost->getID()) . '">' . ff_wp_kses($onePost->getTitle()) . '</a>';
             echo '</p>';
             echo '<p class="news-date">' . ff_wp_kses($onePost->getDateFormated('F d, Y')) . '</p>';
             echo '</li>';
         }
     }
     echo '</ul>';
     echo $args['after_widget'];
 }
开发者ID:migumuno,项目名称:nordicainteriores,代码行数:47,代码来源:class.ffComponent_LatestNewsWidget_Printer.php

示例15: _updateFramework

 private function _updateFramework()
 {
     $versionManager = ffFrameworkVersionManager::getInstance();
     $latestInstalledVersion = $versionManager->getLatestInstalledVersion();
     $newFrameworkVersion = $this->_getFrameworkVersion();
     $pluginInstaller = ffContainer()->getPluginInstaller();
     if (version_compare($newFrameworkVersion, $latestInstalledVersion, '>')) {
         if ($pluginInstaller->installPluginFromZipFile(get_template_directory() . '/install/fresh-framework.zip', false, true)) {
             header("Refresh:0");
             die;
         } else {
             return;
         }
     } else {
         return;
     }
 }
开发者ID:gidbot,项目名称:treble_zero,代码行数:17,代码来源:init.php


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