本文整理匯總了PHP中CTag::store方法的典型用法代碼示例。如果您正苦於以下問題:PHP CTag::store方法的具體用法?PHP CTag::store怎麽用?PHP CTag::store使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CTag
的用法示例。
在下文中一共展示了CTag::store方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: CTag
CAppUI::setMsg("Ligne {$line_number} : {$msg}", UI_MSG_WARNING);
continue;
} else {
CAppUI::setMsg("{$tag1->_class}-msg-create", UI_MSG_OK);
}
}
// TAG LEVEL 2
$tag2 = new CTag();
$ds = $tag2->_spec->ds;
$where = array("name" => $ds->prepare("=%", $line["tag_name_2"]), "object_class" => $ds->prepare("=%", $object_class));
$tag2->loadObject($where);
if (!$tag2->_id) {
$tag2->name = $line["tag_name_2"];
$tag2->object_class = $object_class;
$tag2->parent_id = $tag1->_id;
if ($msg = $tag2->store()) {
CAppUI::setMsg("Ligne {$line_number} : {$msg}", UI_MSG_WARNING);
continue;
} else {
CAppUI::setMsg("{$tag2->_class}-msg-create", UI_MSG_OK);
}
}
// CONCEPT
$concept_prop = CValue::read($prop_map, CMbString::lower($line["concept_type"]));
if (!$concept_prop) {
CAppUI::setMsg("Ligne {$line_number} : type de concept invalide : <strong>{$line['concept_type']}</strong>", UI_MSG_WARNING);
continue;
}
// If list name provided, it needs to exist
if ($line["list_name"]) {
$_list = new CExList();
示例2: CTag
if ($msg) {
CAppUI::setMsg($msg, UI_MSG_ERROR);
$results[$i]["error"] = $msg;
$i++;
continue;
}
CAppUI::setMsg("Favori créé", UI_MSG_OK);
}
$tag_name = $results[$i]["tag"];
if ($tag_name) {
$tag = new CTag();
$tag->name = $tag_name;
$tag->object_class = $object->_class;
$tag->loadMatchingObjectEsc();
if (!$tag->_id) {
$msg = $tag->store();
if ($msg) {
CAppUI::setMsg($msg, UI_MSG_ERROR);
$results[$i]["error"] = $msg;
$i++;
continue;
}
}
$tag_item = new CTagItem();
$tag_item->tag_id = $tag->_id;
$tag_item->object_id = $object->_id;
$tag_item->object_class = $object->_class;
$tag_item->loadMatchingObjectEsc();
if (!$tag_item->_id) {
$msg = $tag_item->store();
if ($msg) {