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


PHP ThemeHelper::findThis方法代码示例

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


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

示例1: linkFormFields

 public function linkFormFields($opts = null)
 {
     // OPTS:
     // label, header, autoCategoryID, autoTarget, instructions
     if ($opts != null) {
         extract($opts);
     }
     if ($autoCategoryID or $autoTarget) {
         $linkOpts = array('autoCategoryID' => $autoCategoryID, 'autoTarget' => $autoTarget);
     }
     if (isset($moreOptions)) {
         parse_str($moreOptions);
     }
     $numPostLinks = 1;
     if (isset($_POST) && isset($_POST[Link::$tableName])) {
         $numPostLinks = 0;
         foreach ($_POST[Link::$tableName] as $key => $val) {
             $categoryID = isset($categoryID) ? $categoryID : 0;
             $valCatID = isset($val["categoryID"]) ? $val["categoryID"] : 0;
             if ($categoryID == $valCatID) {
                 $numPostLinks++;
             }
         }
     }
     $label = isset($label) ? $label : "Link";
     $this->accelJS()->requireFile('jqueryConfirm');
     $js .= "\$('.delete{$label}').click(function(){\n                var linkID = \$(this).attr('title');\n                \$.ajax({\n                    url: '?ajax=true&adminLayout=empty&ado=linkDeleteLink&linkID=' + linkID,\n                    complete: function(data){\n                        \$('#link_form_' + linkID).hide('slow');\n                    }\n                });\n            });\n            \$('.delete{$label}').confirm();\n\n\n            \$('.dissociate{$label}').click(function(){\n                var linkID = \$(this).attr('title');\n                url = '?ajax=true&adminLayout=empty&ado=linkDissociateLink&linkID=' + linkID + '&recordID=" . $this->obj->id() . "&recordType=" . $this->obj->linkKey() . "';\n                \$.ajax({\n                    url: url,\n                    complete: function(data){\n                        \$('#link_form_' + linkID).hide('slow');\n                    }\n                });\n            });\n            \$('.dissociate{$label}').confirm({\n                msg: 'Dissociating will not delete the file. It will still be available in the Link Manager. <br/>  Continue? ',\n                timeout: 7000\n            });\n/*\n            \$('.sorted_list').sortable({\n                opacity: 0.7,\n                update : function(event,ui){\n\n                    idAttr = \$(this).attr('id').replace('recordID_','').split('_');\n                    id = idAttr[1];\n                    tablename  = idAttr[0];\n                    serial = \$(this).sortable('serialize', {});\n\n                    var url = 'index.php?adminAction=linkRecordDisplayOrder&adminLayout=empty&ajax=true&table='+tablename+'&recordID='+id+'&'+serial;\n\n                    \$.ajax({\n                       url: url,\n                       success: function(msg){\n                          //alert ( msg );\n                       }\n                    });\n\n\n                }\n            })*/\n\n\n\n            ";
     $this->accelJS()->ready($js);
     $headTitle = isset($header) ? $header : "And and Update Links";
     // link
     if ($maxLink = $this->obj->maxLink()) {
         $form .= "<h3>{$headTitle}</h3>";
         if ($instructions) {
             $form .= "<div class='link-form-instructions'>" . $instructions . "</div>";
         }
         $numPostLinks = isset($numPostLinks) ? $numPostLinks : 1;
         $linkLimit = $this->obj->linkCount() ? $this->obj->linkCount() : $numPostLinks;
         $form .= "<div class='sorted_list' id='recordID_{$this->obj->linkKey()}_{$this->obj->id()}'>";
         for ($i = 0; $i < $maxLink && $i < $linkLimit; $i++) {
             $link = $this->obj->getLink($i);
             if (!$link) {
                 $link = new Link();
             }
             if ($formOverride) {
                 list($loc, $file) = explode("/", $formOverride);
                 $snippetOpts['moreOptions'] = $moreOptions;
                 $snippetOpts['count'] = $i;
                 $form .= ThemeHelper::findThis()->snippet($loc, $file, $snippetOpts);
             } else {
                 $form .= $link->extrasForm($i, $linkOpts) . "<br/>";
             }
         }
         $form .= "</div>";
         $opts["label"] = "link";
         $opts["button_label"] = "Add Another Link";
         $opts["formOverride"] = isset($formOverride) ? $formOverride : "";
         $opts["moreOptions"] = $moreOptions;
         if ($i < $maxLink) {
             $form .= $this->addAJAXLink($i, $this->obj->maxLink() - 1, $label, $opts);
         }
         return $form;
     }
 }
开发者ID:netacceleration,项目名称:accelpress,代码行数:63,代码来源:FormBuilder.php


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