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


PHP F0FTable::check方法代码示例

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


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

示例1: check

 public function check()
 {
     $date = new JDate($this->date_from);
     $this->date_from = $date->toSql();
     $date1 = new JDate($this->date_to);
     $this->date_to = $date1->toSql();
     return parent::check();
 }
开发者ID:davetheapple,项目名称:oakencraft,代码行数:8,代码来源:productprice.php

示例2: check

 public function check()
 {
     $status = parent::check();
     //to throw error when optionvalue id is empty
     /* if(!$this->optionvalue_id){
     			$this->setError(JText::_('J2STORE_PRODUCT_OPTION_VALUE_MISSING'));
     			$status = false;
     		} */
     return $status;
 }
开发者ID:davetheapple,项目名称:oakencraft,代码行数:10,代码来源:productoptionvalue.php

示例3: check

 public function check()
 {
     if (!isset($this->product_source) || empty($this->product_source)) {
         $this->setError(JText::_('J2STORE_PRODUCT_SOURCE_NOT_FOUND'));
         return false;
     }
     if (!isset($this->product_source_id) || empty($this->product_source_id)) {
         $this->setError(JText::_('J2STORE_PRODUCT_SOURCE_ID_NOT_FOUND'));
         return false;
     }
     return parent::check();
 }
开发者ID:afend,项目名称:RULug,代码行数:12,代码来源:product.php

示例4: check

 public function check()
 {
     $result = true;
     if (!$this->title) {
         $this->setError(JText::_('COM_AKEEBASUBS_APICOUPONS_ERR_TITLE'));
         $result = false;
     }
     if (!$this->key) {
         $this->key = md5(microtime());
     }
     if (!$this->password) {
         $this->password = md5(microtime());
     }
     // Make sure assigned subscriptions really do exist and normalize the list
     if (!empty($this->subscriptions)) {
         if (is_array($this->subscriptions)) {
             $subs = $this->subscriptions;
         } else {
             $subs = explode(',', $this->subscriptions);
         }
         if (empty($subs)) {
             $this->subscriptions = '';
         } else {
             $subscriptions = array();
             foreach ($subs as $id) {
                 $subObject = F0FModel::getTmpInstance('Levels', 'AkeebasubsModel')->setId($id)->getItem();
                 $id = null;
                 if (is_object($subObject)) {
                     if ($subObject->akeebasubs_level_id > 0) {
                         $id = $subObject->akeebasubs_level_id;
                     }
                 }
                 if (!is_null($id)) {
                     $subscriptions[] = $id;
                 }
             }
             $this->subscriptions = implode(',', $subscriptions);
         }
     }
     // Check the type
     if (!in_array($this->type, array('value', 'percent'))) {
         $this->type = 'value';
     }
     // Check value
     if ($this->value < 0) {
         $this->setError(JText::_('COM_AKEEBASUBS_COUPON_ERR_VALUE'));
         $result = false;
     } elseif ($this->value > 100 && $this->type == 'percent') {
         $this->value = 100;
     }
     return parent::check() && $result;
 }
开发者ID:jonatasmm,项目名称:akeebasubs,代码行数:52,代码来源:apicoupon.php

示例5: check

 /**
  * Overrides the automated table checks to handle the 'hash' column for faster searching
  *
  * @return boolean
  */
 public function check()
 {
     // Create a slug if there is a title and an empty slug
     if ($this->hasField('title') && $this->hasField('slug') && empty($this->slug)) {
         $this->slug = F0FStringUtils::toSlug($this->title);
     }
     // Create the SHA-1 hash of the slug for faster searching (make sure the hash column is CHAR(64) to take
     // advantage of MySQL's optimised searching for fixed size CHAR columns)
     if ($this->hasField('hash') && $this->hasField('slug')) {
         $this->hash = sha1($this->slug);
     }
     // Reset cached values
     $this->resetTreeCache();
     return parent::check();
 }
开发者ID:chaudhary4k4,项目名称:modernstore,代码行数:20,代码来源:nested.php

示例6: check

 public function check()
 {
     $result = parent::check();
     if (empty($this->slug)) {
         $this->setError(JText::_('COM_AKEEBASUBS_ERR_SLUG_EMPTY'));
         $result = false;
     } else {
         $pattern = '/^[a-z_][a-z0-9_\\-]*$/';
         if (!preg_match($pattern, $this->slug)) {
             $this->setError(JText::_('COM_AKEEBASUBS_ERR_SLUG_INVALID'));
             $result = false;
         }
     }
     return $result;
 }
开发者ID:jonatasmm,项目名称:akeebasubs,代码行数:15,代码来源:customfield.php

示例7: check

 public function check()
 {
     $result = true;
     if (!$this->country_name) {
         $this->setError(JText::_('COM_J2STORE_COUNTRY_MISSING'));
         $result = false;
     }
     if (!$this->country_isocode_2) {
         $this->setError(JText::_('COM_J2STORE_COUNTRY_ISOCODE2_MISSING'));
         $result = false;
     }
     if (!$this->country_isocode_3) {
         $this->setError(JText::_('COM_J2STORE_COUNTRY_ISOCODE3_MISSING'));
         $result = false;
     }
     return parent::check() && $result;
 }
开发者ID:davetheapple,项目名称:oakencraft,代码行数:17,代码来源:country.php

示例8: check

 public function check()
 {
     $result = true;
     //check variant id exists
     if (empty($this->product_id)) {
         $this->setError(JText::_('COM_J2STORE_VARIANT_ID_MISSING'));
         $result = false;
     }
     if (empty($this->product_file_display_name)) {
         $this->setError(JText::_('J2STORE_PRODUCT_FILE_DISPLAY_NAME_IS_EMPTY'));
         $result = false;
     }
     //check product file path is not empty
     if (empty($this->product_file_save_name)) {
         $this->setError(JText::_('J2STORE_PRODUCT_FILE_PATH_IS_EMPTY'));
         $result = false;
     }
     //to check given file path is valid
     if ($this->checkAttachmentPathExists()) {
         $this->setError(JText::_('J2STORE_PRODUCT_FILE_PATH_IS_EMPTY'));
         $result = false;
     }
     return parent::check() && $result;
 }
开发者ID:davetheapple,项目名称:oakencraft,代码行数:24,代码来源:productfile.php


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