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


PHP tag::getTags方法代码示例

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


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

示例1: get_form

    function get_form() {
        return array(
                'catid'=>array(
                        'selecttype'=>'select',
                        'select'=>form::arraytoselect(category::option(0,'tolast')),
                        'default'=>intval(get('catid')),
                        'regex'=>'/\d+/',
                        'filter'=>'is_numeric',
                ),
                'typeid'=>array(
                        'selecttype'=>'select',
                        'select'=>form::arraytoselect(type::option(0,'tolast')),
                        'default'=>intval(get('typeid')),
                        'regex'=>'/\d+/',
                        'filter'=>'is_numeric',
                ),
				'toppost'=>array(
                        'selecttype'=>'select',
                        'select'=>form::arraytoselect(array(0=>'不置顶',2=>'栏目置顶',3=>'全站置顶')),
                        'default'=>0,
                        'regex'=>'/\d+/',
                        'filter'=>'is_numeric',
                ),
                'ishtml'=>array(
                        'selecttype'=>'radio',
                        'select'=>form::arraytoselect(array(0=>'继承',1=>'生成',2=>'不生成')),
                ),
                'checked'=>array(
                        'selecttype'=>'radio',
                        'select'=>form::arraytoselect(form::yesornotoarray('审核')),
                ),
                'image'=>array(
                        'filetype'=>'image',
                ),
                'thumb'=>array(
                        'filetype'=>'thumb',
                ),
                'displaypos'=>array(
                        'selecttype'=>'checkbox',
                        //'select'=>form::arraytoselect(array(1=>'首页推荐',2=>'首页焦点',3=>'首页头条',4=>'列表页推荐',5=>'内容页推荐')),
                ),
                'htmlrule'=>array(
                        //'tips'=>" 默认:{?category::gethtmlrule(get('id'),'showhtmlrule')}",
                ),
                'template'=>array(
                        'selecttype'=>'select',
                        'select'=>form::arraytoselect(front::$view->archive_tpl_list('archive/show')),
                        //'tips'=>" 默认:{?category::gettemplate(get('id'),'showtemplate')}",
                ),
                'showform'=>array(
                        'selecttype'=>'select',
                        'select'=>form::arraytoselect(get_my_tables_list()),
                        'default'=>"0",
                ),
                'introduce_len'=>array(
                        'default'=>config::get('archive_introducelen')
                ),
                'attr1'=>array(
                        'selecttype'=>'checkbox',
                        'select'=>form::arraytoselect($this->getattrs(1)),
                ),
                'grade'=>array(
                        'selecttype'=>'radio',
                        'select'=>form::arraytoselect(array(0,1,2,3,4,5)),
                ),
                'pics'=>array(
                        'filetype'=>'image2',
                ),
                'author'=>array(
                        'tips'=>' ',
                ),
                'attr3'=>array(
                        'tips'=>' ',
                ),
                'htmlrule'=>array(
                        'selecttype'=>'select',
                        'select'=>form::arraytoselect(getHtmlRule('archive')),
                        'default'=>'',
                ),
        		'tag_option'=>array(
        				'selecttype'=>'select',
        				'select'=>form::arraytoselect(tag::getTags()),
        		),
        );
    }
开发者ID:jiangsuei8,项目名称:public_php_shl,代码行数:85,代码来源:archive.php

示例2: Exception

         // see if the form require the user to upload something
         if ($control->isFile()) {
             $control->setValue($entityId);
             if (!$control->fileUploaded()) {
                 $registry['controls']->missingRequiredUpload = true;
             }
         }
     }
 } else {
     $data = $model->getEntity($entityId);
     if ($data === null) {
         throw new Exception('This entity does not exist. Have you deleted it, or are you just shiting us?');
     }
     foreach ($registry['controls'] as $control) {
         if ($control->name == 'tags') {
             $data['tags'] = implode(' ', tag::getTags($registry['modelLabel'], $entityId));
         }
         // state of the password form?
         if ($control->name == 'passwd') {
             $control->editable = isset($_SESSION['changePasswd']) && $_SESSION['changePasswd'] == 'active';
             $control->generated = isset($_SESSION['generatedPasswd']);
         }
         if ($control->editable == true && !$control->isFile() && $control->type != "passwd") {
             $control->setValue($data[$control->name]);
         }
         if ($control->isFile()) {
             $control->setValue($entityId);
             if ($control->fileUploaded() === false) {
                 $registry['controls']->missingRequiredUpload = true;
             }
         }
开发者ID:madr,项目名称:urban-octo-rotary-phone,代码行数:31,代码来源:manage.php


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