40 $this->
id = (int)$a_value;
60 $this->parent_id = (int)$a_value;
80 $this->title = (
string)$a_value;
100 $this->description = (
string)$a_value;
120 $this->pos = (int)$a_value;
145 $sql =
"SELECT * FROM il_rating_cat".
146 " WHERE id = ".$ilDB->quote($a_id,
"integer");
147 $set = $ilDB->query($sql);
148 $row = $ilDB->fetchAssoc($set);
186 $ilDB->update(
"il_rating_cat", $fields,
198 $id = $ilDB->nextId(
"il_rating_cat");
202 $sql =
"SELECT max(pos) pos FROM il_rating_cat".
203 " WHERE parent_id = ".$ilDB->quote($this->
getParentId(),
"integer");
204 $set = $ilDB->query($sql);
205 $pos = $ilDB->fetchAssoc($set);
210 $fields[
"id"] =
array(
"integer",
$id);
213 $ilDB->insert(
"il_rating_cat", $fields);
221 public static function delete($a_id)
227 $sql =
"DELETE FROM il_rating".
228 " WHERE category_id = ".$ilDB->quote($a_id,
"integer");
229 $ilDB->manipulate($sql);
231 $sql =
"DELETE FROM il_rating_cat".
232 " WHERE id = ".$ilDB->quote($a_id,
"integer");
233 $ilDB->manipulate($sql);
249 $sql =
"SELECT * FROM il_rating_cat".
250 " WHERE parent_id = ".$ilDB->quote($a_parent_obj_id,
"integer").
252 $set = $ilDB->query($sql);
253 while(
$row = $ilDB->fetchAssoc($set))
268 if((
int)$a_parent_obj_id)
270 foreach(self::getAllForObject($a_parent_obj_id) as $item)
272 self::delete($item[
"id"]);
setPosition($a_value)
Set position.
getParentId()
Get parent object id.
static deleteForObject($a_parent_obj_id)
Delete all categories for object.
getPosition()
Get position.
Add rich text string
The name of the decorator.
static getAllForObject($a_parent_obj_id)
Get all categories for object.
getDescription()
Get description.
setParentId($a_value)
Set parent id.
Create styles array
The data for the language used.
getDBProperties()
Parse properties into db definition.
setTitle($a_value)
Set title.
setDescription($a_value)
Set description.
read($a_id)
Load db entry.
__construct($a_id=null)
Constructor.