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


PHP Entity::Init方法代码示例

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


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

示例1: Init

 public function Init()
 {
     parent::Init();
     $this->aValidateRules[] = array('category_title', 'string', 'max' => 200, 'min' => 2, 'allowEmpty' => false, 'label' => $this->Lang_Get('plugin.receptiondesk.receptiondesk_admin_categories_create_title_title'), 'on' => array('receptiondesk_category'));
     $this->aValidateRules[] = array('category_description', 'string', 'max' => 200, 'min' => 2, 'allowEmpty' => false, 'label' => $this->Lang_Get('plugin.receptiondesk.receptiondesk_admin_categories_create_description_title'), 'on' => array('receptiondesk_category'));
     $this->aValidateRules[] = array('category_title', 'category_title_exists', 'on' => array('receptiondesk_category'));
     $this->aValidateRules[] = array('category_url', 'category_url_exists', 'on' => array('receptiondesk_category'));
 }
开发者ID:olegverstka,项目名称:kprf.dev,代码行数:8,代码来源:Category.entity.class.php

示例2: Init

 /**
  * Инициализация
  */
 public function Init()
 {
     parent::Init();
     $this->aValidateRules[] = array('text', 'string', 'max' => Config::Get('module.user.complaint_text_max'), 'min' => 1, 'allowEmpty' => !Config::Get('module.user.complaint_text_required'), 'label' => $this->Lang_Get('user_complaint_text_title'));
     if (Config::Get('module.user.complaint_captcha')) {
         $sCaptchaValidateType = func_camelize('captcha_' . Config::Get('sys.captcha.type'));
         $this->aValidateRules[] = array('captcha', $sCaptchaValidateType, 'name' => 'complaint_user');
     }
 }
开发者ID:pinguo-liguo,项目名称:livestreet,代码行数:12,代码来源:Complaint.entity.class.php

示例3: Init

 public function Init()
 {
     parent::Init();
     $this->aValidateRules[] = array('question_category_id', 'question_category_id', 'on' => array('receptiondesk_question', 'receptiondesk_question_edit'));
     $this->aValidateRules[] = array('question_text', 'string', 'max' => Config::Get('plugin.receptiondesk.receptiondesk_question_text_max_length'), 'min' => 2, 'allowEmpty' => false, 'label' => $this->Lang_Get('plugin.receptiondesk.receptiondesk_admin_question_create_text_title'), 'on' => array('receptiondesk_question', 'receptiondesk_question_edit'));
     $this->aValidateRules[] = array('question_text_hash', 'question_text_hash', 'on' => array('receptiondesk_question'));
     $this->aValidateRules[] = array('question_author_mail', 'email', 'allowEmpty' => Config::Get('plugin.receptiondesk.receptiondesk_create_mail_empty'), 'label' => $this->Lang_Get('plugin.receptiondesk.receptiondesk_admin_question_create_author_mail_title'), 'on' => array('receptiondesk_question'));
     $this->aValidateRules[] = array('question_captcha', 'captcha', 'label' => $this->Lang_Get('plugin.receptiondesk.receptiondesk_admin_question_create_author_captcha_title'), 'on' => array('receptiondesk_question'));
     $this->aValidateRules[] = array('answer_text', 'string', 'min' => 2, 'allowEmpty' => true, 'label' => $this->Lang_Get('plugin.receptiondesk.receptiondesk_admin_answer_create_text_title'), 'on' => array('receptiondesk_question'));
 }
开发者ID:olegverstka,项目名称:kprf.dev,代码行数:10,代码来源:Question.entity.class.php

示例4: Init

 public function Init()
 {
     parent::Init();
     if (!$this->GetSourceType()) {
         $this->SetSourceType();
     }
     if (!$this->GetSmarty()) {
         $this->SetSmarty($this->Viewer_GetSmartyObject());
     }
 }
开发者ID:bhoidhos,项目名称:aceAdminPanel,代码行数:10,代码来源:TplHook.entity.class.php

示例5: Init

 /**
  * Определяем правила валидации
  */
 public function Init()
 {
     parent::Init();
     $this->aValidateRules[] = array('topic_title', 'string', 'max' => Config::Get('module.topic.title_max_length'), 'min' => Config::Get('module.topic.title_min_length'), 'allowEmpty' => Config::Get('module.topic.title_allow_empty'), 'label' => $this->Lang_Get('topic.add.fields.title.label'));
     $this->aValidateRules[] = array('topic_slug_raw', 'regexp', 'allowEmpty' => true, 'pattern' => '#^[a-z0-9\\-]{1,500}$#i');
     $this->aValidateRules[] = array('topic_text_source', 'string', 'max' => Config::Get('module.topic.max_length'), 'min' => Config::Get('module.topic.min_length'), 'allowEmpty' => Config::Get('module.topic.allow_empty'), 'condition' => 'isNeedValidateText', 'label' => $this->Lang_Get('topic.add.fields.text.label'));
     $this->aValidateRules[] = array('topic_tags', 'tags', 'countMax' => 15, 'condition' => 'isNeedValidateTags', 'label' => $this->Lang_Get('topic.add.fields.tags.label'), 'allowEmpty' => Config::Get('module.topic.allow_empty_tags'));
     $this->aValidateRules[] = array('blogs_id_raw', 'blogs');
     $this->aValidateRules[] = array('topic_text_source', 'topic_unique');
     $this->aValidateRules[] = array('topic_slug_raw', 'slug_check');
 }
开发者ID:pinguo-liguo,项目名称:livestreet,代码行数:14,代码来源:Topic.entity.class.php

示例6: Init

 /**
  * Define of validation rule
  */
 public function Init()
 {
     parent::Init();
     $this->aValidateRules[] = array('topic_title', 'string', 'max' => 200, 'min' => 2, 'allowEmpty' => false, 'label' => E::ModuleLang()->Get('topic_create_title'), 'on' => array('topic'));
     $this->aValidateRules[] = array('question_title', 'string', 'max' => 200, 'min' => 2, 'allowEmpty' => true, 'label' => E::ModuleLang()->Get('topic_create_question_title'), 'on' => array('topic'));
     $this->aValidateRules[] = array('topic_text_source', 'string', 'max' => Config::Get('module.topic.max_length'), 'min' => 2, 'allowEmpty' => false, 'label' => E::ModuleLang()->Get('topic_create_text'), 'on' => array('topic'));
     $this->aValidateRules[] = array('topic_tags', 'tags', 'count' => 15, 'allowEmpty' => Config::Get('module.topic.allow_empty_tags'), 'label' => E::ModuleLang()->Get('topic_create_tags'), 'on' => array('topic'));
     $this->aValidateRules[] = array('blog_id', 'blog_id', 'on' => array('topic'));
     $this->aValidateRules[] = array('topic_text_source', 'topic_unique', 'on' => array('topic'));
     $this->aValidateRules[] = array('topic_type', 'topic_type', 'on' => array('topic'));
     $this->aValidateRules[] = array('link_url', 'url', 'allowEmpty' => true, 'label' => E::ModuleLang()->Get('topic_link_create_url'), 'on' => array('topic'));
 }
开发者ID:hard990,项目名称:altocms,代码行数:15,代码来源:Topic.entity.class.php

示例7: Init

 /**
  * Определяем правила валидации
  * Правила валидации нужно определять только здесь!
  *
  * @var array
  */
 public function Init()
 {
     parent::Init();
     $this->aValidateRules[] = array('login', 'login', 'on' => array('registration', ''));
     $this->aValidateRules[] = array('login', 'login_exists', 'on' => array('registration'));
     $this->aValidateRules[] = array('mail', 'email', 'allowEmpty' => false, 'on' => array('registration', ''));
     $this->aValidateRules[] = array('mail', 'mail_exists', 'on' => array('registration'));
     $this->aValidateRules[] = array('password', 'password', 'on' => array('registration'));
     $this->aValidateRules[] = array('password_confirm', 'compare', 'compareField' => 'password', 'on' => array('registration'));
     // Определяем дополнительные правила валидации
     if (Config::Get('module.user.captcha_use_registration')) {
         $this->aValidateRules[] = array('captcha', 'captcha', 'on' => array('registration'));
     }
 }
开发者ID:Azany,项目名称:altocms,代码行数:20,代码来源:User.entity.class.php

示例8: Init

 public function Init()
 {
     parent::Init();
     $this->aCfg = Config::GetData('module.captcha');
     $this->Reset();
 }
开发者ID:AntiqS,项目名称:altocms,代码行数:6,代码来源:Captcha.entity.class.php

示例9: Init

 public function Init()
 {
     parent::Init();
     $this->aValidateRules[] = array('subscription_mail', 'email', 'allowEmpty' => false, 'label' => $this->Lang_Get('plugin.subscription.subscription_block_subscription_input'), 'on' => array('subscription_mail'));
 }
开发者ID:olegverstka,项目名称:kprf.dev,代码行数:5,代码来源:Subscription.entity.class.php

示例10: Init

 /**
  * Инициализация
  */
 public function Init()
 {
     parent::Init();
     $this->aValidateRules[] = array('text', 'string', 'max' => Config::Get('module.user.usernote_text_max'), 'min' => 1, 'allowEmpty' => false);
 }
开发者ID:lunavod,项目名称:bunker_stable,代码行数:8,代码来源:Note.entity.class.php

示例11: Init

 /**
  * Инициализация
  */
 public function Init()
 {
     parent::Init();
     $this->aValidateRules[] = array('text', 'string', 'max' => Config::Get('module.wall.text_max'), 'min' => Config::Get('module.wall.text_min'), 'allowEmpty' => false, 'on' => array('', 'add'));
 }
开发者ID:lunavod,项目名称:bunker_stable,代码行数:8,代码来源:Wall.entity.class.php

示例12: Init

 public function Init()
 {
     parent::Init();
     $this->aValidateRules[] = array('type_code', 'string', 'min' => 2, 'max' => 10, 'allowEmpty' => false, 'label' => E::ModuleLang()->Get('action.admin.blogtypes_typecode'), 'on' => array('add'));
 }
开发者ID:hard990,项目名称:altocms,代码行数:5,代码来源:BlogType.entity.class.php

示例13: Init

 /**
  * Инициализация
  */
 public function Init()
 {
     parent::Init();
     $this->aBehaviors['category']['validate_require'] = !Config::Get('module.blog.category_allow_empty');
     $this->aBehaviors['category']['validate_only_without_children'] = Config::Get('module.blog.category_only_without_children');
 }
开发者ID:Casper-SC,项目名称:livestreet,代码行数:9,代码来源:Blog.entity.class.php


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