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


PHP Generic::showLinkToRecord方法代码示例

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


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

示例1: renderReadOnly

 public function renderReadOnly($value, $rowId)
 {
     $siteBaseURL = WOOOF::$instance->getConfigurationFor('siteBaseURL');
     $imagesRelativePath = WOOOF::$instance->getConfigurationFor('imagesRelativePath');
     global $__isAdminPage;
     global $__isSiteBuilderPage;
     if ($__isSiteBuilderPage) {
         $this->isInvisible = false;
     }
     if ($this->isInvisible) {
         return '';
     }
     switch ($this->presentationType) {
         case WOOOF_columnPresentationTypes::checkBox:
             require WOOOF::$instance->getConfigurationFor('templatesRepository') . 'wooof_renderReadOnly_1.activeTemplate.php';
             if ($value == '1') {
                 $product = $checkboxActive;
             } else {
                 $product = $checkboxInActive;
             }
             break;
         case WOOOF_columnPresentationTypes::date:
             $product = WOOOF::decodeDate($value);
             break;
         case WOOOF_columnPresentationTypes::time:
             $product = WOOOF::decodeTime($value);
             break;
         case WOOOF_columnPresentationTypes::dateAndTime:
             $product = WOOOF::decodeDateTime($value, '/', TRUE);
             break;
         case WOOOF_columnPresentationTypes::autoComplete:
         case WOOOF_columnPresentationTypes::dropList:
         case WOOOF_columnPresentationTypes::radioHoriz:
         case WOOOF_columnPresentationTypes::radioVert:
             $result = $this->dataBase->query('select ' . $this->columnToShow . ' from ' . $this->valuesTable . ' where ' . $this->columnToStore . '=\'' . $value . '\'');
             if ($result === FALSE) {
                 return FALSE;
             }
             $row = $this->dataBase->fetchAssoc($result);
             $product = $row[$this->columnToShow];
             //TODO: Antonis Temporary change
             ///*
             if ($value != '' && $__isSiteBuilderPage && $this->presentationType == WOOOF_columnPresentationTypes::dropList && substr($this->valuesTable, 0, 2) != '__' && class_exists('Generic')) {
                 $product = Generic::showLinkToRecord($this->valuesTable, $value, 'view', $product);
             }
             //*/
             break;
         case WOOOF_columnPresentationTypes::textBox:
             $product = $value;
             break;
         case WOOOF_columnPresentationTypes::htmlText:
             $product = $value;
             if ($__isAdminPage) {
                 $product = strip_tags($product);
                 if ($product == '') {
                     $product = '   ';
                 }
             }
             break;
         case WOOOF_columnPresentationTypes::textArea:
         default:
             $value = nl2br($value);
             if (strlen($value) > 6000) {
                 $product = substr($value, 0, 60) . '...';
             } else {
                 $product = $value;
             }
             break;
         case WOOOF_columnPresentationTypes::file:
             if (!WOOOF::$instance->hasContent($value)) {
                 $product = '';
             } else {
                 $fR = $this->dataBase->query('select * from __externalFiles where id=\'' . $value . '\'');
                 if ($fR === FALSE) {
                     return FALSE;
                 }
                 $f = $this->dataBase->fetchAssoc($fR);
                 require WOOOF::$instance->getConfigurationFor('templatesRepository') . 'wooof_renderReadOnly_2.activeTemplate.php';
                 if (isset($f['id'])) {
                     $product = $actualFileLink;
                 } else {
                     WOOOF::$instance->log(WOOOF_loggingLevels::WOOOF_ERROR, self::_ECP . "0210 File [{$value}] was not found in __externalFiles");
                     $product = 'File not found';
                 }
             }
             break;
         case WOOOF_columnPresentationTypes::picture:
             if (trim($this->presentationParameters) == '') {
                 $prefix = $imagesRelativePath;
             } else {
                 $prefix = trim($this->presentationParameters);
             }
             if (!$__isAdminPage) {
                 if ($value == '') {
                     $product = $imagesRelativePath . 'spacer.gif';
                 } else {
                     $product = $prefix . $value;
                 }
             } else {
                 require WOOOF::$instance->getConfigurationFor('templatesRepository') . 'wooof_renderReadOnly_3.activeTemplate.php';
//.........这里部分代码省略.........
开发者ID:ormikopo1988,项目名称:movierama,代码行数:101,代码来源:wooof.php


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