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


PHP RevOperations::getPostTypesWithCatsForClient方法代码示例

本文整理汇总了PHP中RevOperations::getPostTypesWithCatsForClient方法的典型用法代码示例。如果您正苦于以下问题:PHP RevOperations::getPostTypesWithCatsForClient方法的具体用法?PHP RevOperations::getPostTypesWithCatsForClient怎么用?PHP RevOperations::getPostTypesWithCatsForClient使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在RevOperations的用法示例。


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

示例1: __construct

 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct();
     $revSliderAdmin = Mage::getSingleton('RevSliderAdmin');
     $revSliderAdmin->requireSettings("slider_settings");
     $settingsMain = $revSliderAdmin->getSettings("slider_main");
     $settingsParams = $revSliderAdmin->getSettings("slider_params");
     $settingsSliderMain = new RevSliderSettingsProduct();
     $settingsSliderParams = new UniteSettingsProductSidebarRev();
     //get taxonomies with cats
     $postTypesWithCats = RevOperations::getPostTypesWithCatsForClient();
     $jsonTaxWithCats = UniteFunctionsRev::jsonEncodeForClientSide($postTypesWithCats);
     //check existing slider data:
     $sliderID = $this->getRequest()->getParam('id');
     if (!empty($sliderID)) {
         $slider = new RevSlider();
         $slider->initByID($sliderID);
         //get setting fields
         $settingsFields = $slider->getSettingsFields();
         $arrFieldsMain = $settingsFields["main"];
         $arrFieldsParams = $settingsFields["params"];
         //modify arrows type for backword compatability
         $arrowsType = UniteFunctionsRev::getVal($arrFieldsParams, "navigation_arrows");
         switch ($arrowsType) {
             case "verticalcentered":
                 $arrFieldsParams["navigation_arrows"] = "solo";
                 break;
         }
         //set custom type params values:
         $settingsMain = RevSliderSettingsProduct::setSettingsCustomValues($settingsMain, $arrFieldsParams, $postTypesWithCats);
         //set setting values from the slider
         $settingsMain->setStoredValues($arrFieldsParams);
         $settingsParams->setStoredValues($arrFieldsParams);
         //update short code setting
         $shortcode = $slider->getShortcode();
         $settingsMain->updateSettingValue("shortcode", htmlentities($shortcode));
         $linksEditSlides = $this->helper("adminhtml")->getUrl('adminhtml/nwdrevslider/slides/id/' . $sliderID);
         $settingsSliderParams->init($settingsParams);
         $settingsSliderMain->init($settingsMain);
         $settingsSliderParams->isAccordion(true);
         $this->assign('sliderID', $sliderID);
         $this->assign('linksEditSlides', $linksEditSlides);
         $this->assign('arrFieldsParams', $arrFieldsParams);
         $this->setTemplate('nwdthemes/revslider/templates/slider_edit.phtml');
     } else {
         //set custom type params values:
         $settingsMain = RevSliderSettingsProduct::setSettingsCustomValues($settingsMain, array(), $postTypesWithCats);
         $settingsSliderParams->init($settingsParams);
         $settingsSliderMain->init($settingsMain);
         $settingsSliderParams->isAccordion(true);
         $this->setTemplate('nwdthemes/revslider/templates/slider_new.phtml');
     }
     $this->assign('sliderTemplate', $this->_sliderTemplate);
     $this->assign('settingsSliderMain', $settingsSliderMain);
     $this->assign('settingsSliderParams', $settingsSliderParams);
     $this->assign('jsonTaxWithCats', $jsonTaxWithCats);
 }
开发者ID:perseusl,项目名称:kingdavid,代码行数:60,代码来源:Edit.php

示例2: RevSliderSettingsProduct

<?php

$sliderTemplate = true;
$settingsMain = self::getSettings("slider_main");
$settingsParams = self::getSettings("slider_params");
$settingsSliderMain = new RevSliderSettingsProduct();
$settingsSliderParams = new UniteSettingsProductSidebarRev();
//get taxonomies with cats
$postTypesWithCats = RevOperations::getPostTypesWithCatsForClient();
$jsonTaxWithCats = UniteFunctionsRev::jsonEncodeForClientSide($postTypesWithCats);
//check existing slider data:
$sliderID = self::getGetVar("id");
if (!empty($sliderID)) {
    $slider = new RevSlider();
    $slider->initByID($sliderID);
    //get setting fields
    $settingsFields = $slider->getSettingsFields();
    $arrFieldsMain = $settingsFields["main"];
    $arrFieldsParams = $settingsFields["params"];
    //modify arrows type for backword compatability
    $arrowsType = UniteFunctionsRev::getVal($arrFieldsParams, "navigation_arrows");
    switch ($arrowsType) {
        case "verticalcentered":
            $arrFieldsParams["navigation_arrows"] = "solo";
            break;
    }
    //set custom type params values:
    $settingsMain = RevSliderSettingsProduct::setSettingsCustomValues($settingsMain, $arrFieldsParams, $postTypesWithCats);
    //set setting values from the slider
    $settingsMain->setStoredValues($arrFieldsParams);
    $settingsParams->setStoredValues($arrFieldsParams);
开发者ID:cybKIRA,项目名称:roverlink-updated,代码行数:31,代码来源:slider_template.php


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