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


PHP CMbArray::getPrevNextKeys方法代码示例

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


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

示例1: testGetPrevNextKeysHasRightReturn

 public function testGetPrevNextKeysHasRightReturn()
 {
     $resArray = array("prev" => null, "next" => "key2");
     $this->assertEquals($resArray, $this->stub->getPrevNextKeys(array("key1" => "val1", "key2" => "val2"), "key1"));
     $resArray = array("prev" => "key1", "next" => "key3");
     $this->assertEquals($resArray, $this->stub->getPrevNextKeys(array("key1" => "val1", "key2" => "val2", "key3" => "val3"), "key2"));
     $resArray = array("prev" => "key1", "next" => null);
     $this->assertEquals($resArray, $this->stub->getPrevNextKeys(array("key1" => "val1", "key2" => "val2"), "key2"));
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:9,代码来源:CMbArrayTest.php

示例2: foreach

}
if (CValue::get("reloadzones") == 1) {
    $smarty->display("inc_zones_fields.tpl");
} else {
    if (!$compte_rendu_id && !$switch_mode && ($compte_rendu->fast_edit || $force_fast_edit || $compte_rendu->fast_edit_pdf && $pdf_thumbnails && $pdf_and_thumbs)) {
        $printers = $function->loadBackRefs("printers");
        if (is_array($printers)) {
            /** @var $_printer CPrinter */
            foreach ($printers as $_printer) {
                $_printer->loadTargetObject();
            }
        }
        $smarty->assign("_source", $templateManager->document);
        $smarty->assign("printers", $printers);
        $smarty->assign("object_guid", CValue::get("object_guid"));
        $smarty->assign("unique_id", CValue::get("unique_id"));
        $smarty->display("fast_mode.tpl");
    } else {
        // Charger le document précédent et suivant
        $prevnext = array();
        if ($compte_rendu->_id) {
            $object->loadRefsDocs();
            $prevnext = CMbArray::getPrevNextKeys($object->_ref_documents, $compte_rendu->_id);
        }
        $templateManager->initHTMLArea();
        $smarty->assign("switch_mode", CValue::get("switch_mode", 0));
        $smarty->assign("templateManager", $templateManager);
        $smarty->assign("prevnext", $prevnext);
        $smarty->display("edit_compte_rendu.tpl");
    }
}
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:edit_compte_rendu.php

示例3: array

$smarty->assign("file_id", $file_id);
$smarty->assign("isConverted", $isConverted);
$smarty->assign("show_editor", $show_editor);
$smarty->assign("display_as_is", $display_as_is);
if ($popup == 1) {
    $listCat = null;
    $fileprev = null;
    $filenext = null;
    if ($object) {
        $affichageFile = CFile::loadDocItemsByObject($object);
        // Récupération du fichier/doc préc et suivant
        $aAllFilesDocs = array();
        foreach ($affichageFile as $keyCat => $currCat) {
            $aAllFilesDocs = array_merge($aAllFilesDocs, $affichageFile[$keyCat]["items"]);
        }
        $aFilePrevNext = CMbArray::getPrevNextKeys($aAllFilesDocs, $keyFileSel);
        foreach ($aFilePrevNext as $key => $value) {
            if ($value) {
                $aFile =& $aAllFilesDocs[$aFilePrevNext[$key]];
                $keyFile = $aFile->_spec->key;
                ${"file" . $key} = array("elementId" => $aFile->{$keyFile}, "elementClass" => $aFile->_class);
            }
        }
        // Récupération des destinataires pour l'envoi par mail
        $destinataires = array();
        CDestinataire::makeAllFor($object);
        $list_destinataires = CDestinataire::$destByClass;
        foreach ($list_destinataires as $_destinataires_by_class) {
            foreach ($_destinataires_by_class as $_destinataire) {
                if (!isset($_destinataire->nom) || strlen($_destinataire->nom) == 0 || $_destinataire->nom === " ") {
                    continue;
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:31,代码来源:preview_files.php


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