function appendLimitation($identifier, $values) { $limitation = eZPolicyLimitation::create($this->ID, $identifier); $db = eZDB::instance(); $db->begin(); $limitation->store(); $limitationID = $limitation->attribute('id'); $limitations = array(); foreach ($values as $value) { $limitationValue = eZPolicyLimitationValue::create($limitationID, $value); $limitationValue->store(); if (isset($limitation->Values)) { $limitation->Values[] = $limitationValue; } } $db->commit(); if (isset($this->Limitations)) { $this->Limitations[] = $limitation; } return $limitation; }