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


PHP Label::getLabel方法代码示例

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


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

示例1: insert

 public function insert(Label $O_label)
 {
     if (!is_null($O_label->getLabel() && $O_label->getModel() && $O_label->getReference() && $O_label->getDescription() && $O_label->getLifeTime() && $O_label->getControlCycle() && $O_label->getNotice() && $O_label->getProcedure() && $O_label->getImage() && $O_label->getSize() && $O_label->getColor() && $O_label->getCategoryEpiId())) {
         var_dump($O_label);
         $S_label = $O_label->getLabel();
         $S_model = $O_label->getModel();
         $S_reference = $O_label->getReference();
         $S_description = $O_label->getDescription();
         $I_lifeTime = $O_label->getLifeTime();
         $I_controleCycle = $O_label->getControlCycle();
         $S_notice = $O_label->getNotice();
         $S_procedure = $O_label->getProcedure();
         $S_image = $O_label->getImage();
         $S_size = $O_label->getSize();
         $S_color = $O_label->getColor();
         $I_categoryEpiId = $O_label->getCategoryEpiId();
         $S_sql = 'INSERT INTO `label_epi` (`label`, `model`, `reference`, `description`, `lifetime`, `control_cycle`, `notice`, `procedure`, `image`, `size`, `color`, `category_epi_id`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)';
         $A_params = array($S_label, $S_model, $S_reference, $S_description, $I_lifeTime, $I_controleCycle, $S_notice, $S_procedure, $S_image, $S_size, $S_color, $I_categoryEpiId);
         $O_connection = new Connection();
         if ($I_labelId = $O_connection->requestDb($S_sql, $A_params)) {
             return $I_labelId;
         } else {
             throw new Exception("Des informations obligatoires sont manquantes, nous ne pouvons pas créer le modèle");
         }
     }
 }
开发者ID:Vincent-Troccaz,项目名称:safety,代码行数:26,代码来源:LabelMapper.php

示例2: updateActual

 public function updateActual($aData)
 {
     if (isset($aData['id'])) {
         $this->id = $aData['id'];
         $this->edited = new Doctrine_Expression('NOW()');
     } else {
         $this->created = new Doctrine_Expression('NOW()');
         $this->edited = new Doctrine_Expression('NOW()');
     }
     $aTags = Tag::checkTags(Tag::makeTags($aData['tags']));
     $this->title = $aData['title'];
     $this->shortcontent = trim(stripslashes($aData['shortcontent']));
     $this->fullcontent = trim(stripslashes($aData['fullcontent']));
     $this->tags = $aData['tags'];
     $this->active = $aData['active'];
     $this->link = Webbers_Normalize::Link($aData['title']);
     $this->AktualsTags->delete();
     $this->AktualsLabels->delete();
     $this->save();
     if (sizeof($aTags) > 0) {
         foreach ($aTags as $tag) {
             $aktualTags = new AktualsTag();
             $aktualTags->Aktuals_id = $this->id;
             $aktualTags->Tags_id = $tag->id;
             $aktualTags->save();
         }
     }
     $labels = array();
     if (isset($aData['newlabel']) and $aData['newlabel'] != '') {
         $newLabel = Webbers_Normalize::Name($aData['newlabel']);
         $label = Label::getLabel($newLabel);
         if ($label != false) {
             $labelID = $label->id;
         } else {
             $label = new Label();
             $label->Gname = $newLabel;
             $label->save();
             $labelID = $label->getIncremented();
         }
         $labels = array($labelID);
     }
     if (isset($aData['labels']) and sizeof($aData['labels']) > 0) {
         $labels = array_unique(array_merge($aData['labels'], $labels));
         foreach ($labels as $lab) {
             $al = new AktualsLabel();
             $al->Labels_id = $lab;
             $al->Aktuals_id = $this->id;
             $al->save();
         }
     }
     return $this->id;
 }
开发者ID:jager,项目名称:cms,代码行数:52,代码来源:Aktual.php


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