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


PHP ExtraFields::remove方法代码示例

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


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

示例1: onCustomizeExtraFields

 private function onCustomizeExtraFields()
 {
     if ($this->_realAccessLevel < ACCESS_LEVEL_SA) {
         CommonErrors::fatal(COMMONERROR_PERMISSION, $this);
         return;
         //$this->fatal(ERROR_NO_PERMISSION);
     }
     $extraFieldsMaintScript = $this->getTrimmedInput('commandList', $_POST);
     $extraFieldsMaintScriptArray = explode(',', $extraFieldsMaintScript);
     foreach ($extraFieldsMaintScriptArray as $index => $commandEncoded) {
         $command = urldecode($commandEncoded);
         $args = explode(' ', $command);
         if (!isset($args[0])) {
             continue;
         }
         switch ($args[0]) {
             case 'ADDFIELD':
                 $args = explode(' ', $command, 4);
                 $extraFields = new ExtraFields($this->_siteID, intval($args[1]));
                 $extraFields->define(urldecode($args[3]), intval($args[2]));
                 break;
             case 'DELETEFIELD':
                 $args = explode(' ', $command, 3);
                 $extraFields = new ExtraFields($this->_siteID, intval($args[1]));
                 $extraFields->remove(urldecode($args[2]));
                 break;
             case 'ADDOPTION':
                 $args = explode(' ', $command, 3);
                 $args2 = explode(':', $args[2]);
                 $extraFields = new ExtraFields($this->_siteID, intval($args[1]));
                 $extraFields->addOptionToColumn(urldecode($args2[0]), urldecode($args2[1]));
                 break;
             case 'DELETEOPTION':
                 $args = explode(' ', $command, 3);
                 $args2 = explode(':', $args[2]);
                 $extraFields = new ExtraFields($this->_siteID, intval($args[1]));
                 $extraFields->deleteOptionFromColumn(urldecode($args2[0]), urldecode($args2[1]));
                 break;
             case 'SWAPFIELDS':
                 $args = explode(' ', $command, 3);
                 $args2 = explode(':', $args[2]);
                 $extraFields = new ExtraFields($this->_siteID, intval($args[1]));
                 $extraFields->swapColumns(urldecode($args2[0]), urldecode($args2[1]));
                 break;
             case 'RENAMEROW':
                 $args = explode(' ', $command, 3);
                 $args2 = explode(':', $args[2]);
                 $extraFields = new ExtraFields($this->_siteID, intval($args[1]));
                 $extraFields->renameColumn(urldecode($args2[0]), urldecode($args2[1]));
                 break;
         }
     }
     CATSUtility::transferRelativeURI('m=settings&a=customizeExtraFields');
 }
开发者ID:rankinp,项目名称:OpenCATS,代码行数:54,代码来源:SettingsUI.php


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