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


PHP AppModel::afterFind方法代码示例

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


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

示例1: afterFind

 public function afterFind($results, $primary = false)
 {
     parent::afterFind($results, $primary);
     if (Router::getParam('action') !== 'editar') {
         return $this->formatDateFields($results, $this->datesToLoad, "%a - %d/%m/%Y %H:%M");
     }
 }
开发者ID:AmmonMa,项目名称:cake_ERP,代码行数:7,代码来源:GestaoEvento_Site_Fora.php

示例2: afterFind

 /**
  * After find callback
  * 
  * @param array
  * @param boolean
  * @return array
  */
 public function afterFind($results = array(), $primary = null)
 {
     for ($i = 0; $i < count($results); $i++) {
         // the 'put the icon html here' part of that if statement is temporary and can be removed soon 9/6/2013 RK
         $results[$i][$this->alias]['icon'] = !empty($results[$i][$this->alias]['icon']) && $results[$i][$this->alias]['icon'] != 'put the icon html here' ? $results[$i][$this->alias]['icon'] : $this->dummyfield('icon');
     }
     return parent::afterFind($results, $primary);
 }
开发者ID:ayaou,项目名称:Zuha,代码行数:15,代码来源:Template.php

示例3: afterFind

 public function afterFind($results, $primary = false)
 {
     parent::afterFind($results, $primary);
     $format = ['Concluido' => 'Concluído', 'Atuando' => 'Téc. Atuando'];
     foreach ($results as $key => $val) {
         $results[$key][$this->alias]['status'] = isset($format[$val[$this->alias]['status']]) ? $format[$val[$this->alias]['status']] : $val[$this->alias]['status'];
     }
     return $results;
 }
开发者ID:AmmonMa,项目名称:cake_ERP,代码行数:9,代码来源:AcionamentoCampo_Status.php

示例4: afterFind

 /**
  * Altera para texto a informação contida no campo ativo (0 = Não e 1 = Sim)
  * 
  * {@inheritDoc}
  *
  * @see Model::afterFind()
  */
 public function afterFind($results, $primary = false)
 {
     foreach ($results as $key => $value) {
         if (isset($value['Sistema']['ativo'])) {
             $results[$key]['Sistema']['ativoTexto'] = $results[$key]['Sistema']['ativo'] ? __('Sim') : __('Não');
         }
     }
     return parent::afterFind($results, $primary);
 }
开发者ID:robertinosantiago,项目名称:ufpr-guardiao,代码行数:16,代码来源:Sistema.php

示例5: afterFind

 /**
  * After getting data we add an extra field "url" to avoid extra arrays in the views and extra Routes resolution
  **/
 public function afterFind($results, $primary = false)
 {
     foreach ($results as $k => $result) {
         if (isset($result[$this->alias]['slug'])) {
             $results[$k][$this->alias]['url'] = '/' . $result[$this->alias]['slug'];
         }
     }
     return parent::afterFind($results, $primary);
 }
开发者ID:EhteshamMehmood,项目名称:BlogMVC,代码行数:12,代码来源:Post.php

示例6: afterFind

 public function afterFind($items, $primary = false)
 {
     parent::afterFind($items);
     foreach ($items as $index => $item) {
         if (isset($items[$index][$this->alias])) {
             $items[$index][$this->alias]['url'] = DS . 'files' . DS . 'assets' . DS . $item[$this->alias]['folder'] . DS . 'original' . DS . $item[$this->alias]['id'] . '.' . $item[$this->alias]['extension'];
         }
     }
     return $items;
 }
开发者ID:sebbdk,项目名称:botcraft,代码行数:10,代码来源:AssetFile.php

示例7: afterFind

 /**
  * Encrypted Id and convert time format to 24 hour time format after find
  * @param array $result data
  * @param bool  $primary
  * @return array $result encrypted id
  * @author Gaurav Bhandari
  */
 public function afterFind($results, $primary = false)
 {
     $results = parent::afterFind($results);
     foreach ($results as $key => $val) {
         if (isset($val['Group']['meeting_time'])) {
             $results[$key]['Group']['meeting_time'] = date("H:i", strtotime($val['Group']['meeting_time']));
         }
     }
     return $results;
 }
开发者ID:yogesha3,项目名称:yogesh-test,代码行数:17,代码来源:Group.php

示例8: afterFind

 public function afterFind($results, $primary = false)
 {
     parent::afterFind($results, $primary);
     foreach ($results as $key => $val) {
         if (isset($val[$this->alias]['fees'])) {
             $results[$key][$this->alias]['fees'] = unserialize($val[$this->alias]['fees']);
         }
     }
     return $results;
 }
开发者ID:julienasp,项目名称:Pilule,代码行数:10,代码来源:StudentTuitionSemester.php

示例9: afterFind

 function afterFind($results, $primary = false)
 {
     parent::afterFind($results, $primary);
     foreach ($results as $k => $auditorBranch) {
         if (!empty($auditorBranch['AuditorFirmHO']['id'])) {
             $results[$k]['AuditorBranch']['auditor_branch_name'] .= ' (HO)';
         }
     }
     return $results;
 }
开发者ID:shashin62,项目名称:abc_audit,代码行数:10,代码来源:auditor_branch.php

示例10: afterFind

 public function afterFind($results, $primary = false)
 {
     parent::afterFind($results, $primary);
     foreach ($results as $key => $value) {
         if (isset($value[$this->alias]['payment_date'])) {
             $results[$key][$this->alias]['payment_date'] = $this->formatPaypalDateToDate($value[$this->alias]['payment_date']);
         }
     }
     return $results;
 }
开发者ID:thedrumz,项目名称:music,代码行数:10,代码来源:Payment.php

示例11: afterFind

 /**
  * Encrypted Id after find and upper case first letter of profession name
  * @param array $results data
  * @param bool  $primary
  * @return array $result encrypted id
  * @author Priti Kabra
  */
 public function afterFind($results, $primary = false)
 {
     $results = parent::afterFind($results);
     foreach ($results as $key => $val) {
         if (isset($val['ProfessionCategory']['name'])) {
             $results[$key]['ProfessionCategory']['name'] = ucfirst($val['ProfessionCategory']['name']);
         }
     }
     return $results;
 }
开发者ID:yogesha3,项目名称:yogesh-test,代码行数:17,代码来源:ProfessionCategory.php

示例12: afterFind

 function afterFind($results, $primary = false)
 {
     $results = parent::afterFind($results, $primary);
     //var_dump($results);
     foreach ($results as $key => $val) {
         $results[$key]['Profile']['fullname'] = $results[$key]['Profile']['firstname'] . ' ' . $results[$key]['Profile']['lastname'];
     }
     //$results['Patient']['patient_number'] = strtoupper($results['Patient']['patient_number']);
     //var_dump($results);
     return $results;
 }
开发者ID:jet77,项目名称:DiabeteSavior,代码行数:11,代码来源:Profile.php

示例13: afterFind

 function afterFind($results, $primary)
 {
     $results = parent::afterFind($results, $primary);
     if (!$primary) {
         $return = $this->behaviorsTrigger($this, 'assocAfterFind', array($results, $primary), array('modParams' => true));
         if ($return !== true) {
             $results = $return;
         }
     }
     return $results;
 }
开发者ID:kevthunder,项目名称:cake-shop,代码行数:11,代码来源:shop_app_model.php

示例14: afterFind

 function afterFind($results, $primary = false)
 {
     $results = parent::afterFind($results, $primary);
     //var_dump($results);
     foreach ($results as $key => $val) {
         if (isset($val['Patient']['patient_number'])) {
             $results[$key]['Patient']['patient_number'] = strtoupper($val['Patient']['patient_number']);
         }
     }
     //$results['Patient']['patient_number'] = strtoupper($results['Patient']['patient_number']);
     return $results;
 }
开发者ID:jet77,项目名称:DiabeteSavior,代码行数:12,代码来源:Patient.php

示例15: afterFind

 public function afterFind($results, $primary = false)
 {
     Configure::write('debug', 2);
     App::uses("CakeTime", "Utility");
     $gc = new CakeTime();
     parent::afterFind($results, $primary);
     if (isset($results[0]['Order']['timestamp'])) {
         foreach ($results as $key => $val) {
             $results[$key]['Order']['created'] = $gc->timeAgoInWords($results[$key]['Order']['timestamp']);
         }
     }
     return $results;
 }
开发者ID:ashutoshdev,项目名称:pickmeals-web,代码行数:13,代码来源:Order.php


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