public function create($entity_guid, $name, $value, $value_type = '', $owner_guid = 0, $access_id = ACCESS_PRIVATE)
{
$entity = get_entity($entity_guid);
if (!$entity) {
return false;
}
$owner_guid = (int) $owner_guid;
if ($owner_guid == 0) {
$owner_guid = $this->session->getLoggedInUserGuid();
}
$this->iterator++;
$id = $this->iterator;
$row = (object) ['type' => 'annotation', 'id' => $id, 'entity_guid' => $entity->guid, 'owner_guid' => $owner_guid, 'name' => $name, 'value' => $value, 'value_type' => $value_type, 'time_created' => $this->getCurrentTime()->getTimestamp(), 'access_id' => (int) $access_id];
$annotation = new \ElggAnnotation($row);
$this->mocks[$id] = $annotation;
return $id;
}