本文整理汇总了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");
}
}
}
示例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;
}