classes/hypeJunction/Prototyper/Elements/AnnotationField.php
public function getValues(\ElggEntity $entity) {
		$values = array();
		$sticky = $this->getStickyValue();

		if ($sticky) {
			$keys = array_keys($sticky['value']);
			foreach ($keys as $i) {
				$ann = new \stdClass();
				$ann->id = $sticky['id'][$i];
				$ann->name = $sticky['name'][$i];
				$ann->value = $sticky['value'][$i];
				$ann->access_id = $sticky['access_id'][$i];
				$ann->owner_guid = $sticky['owner_guid'][$i];

				$values[$i] = $ann;
			}
		} else if ($entity->guid) {
			$values = elgg_get_annotations(array(
				'guids' => (int) $entity->guid,
				'metadata_names' => $this->getShortname(),
				'limit' => 0,
			));
		}

		if (empty($values)) {
			$ann = new \stdClass();
			$ann->value = $this->getDefaultValue();
			$values = array($ann);
		}

		return array_values($values);
	}
public function getValues(\ElggEntity $entity) {
		$values = array();
		$sticky = $this->getStickyValue();

		if ($sticky) {
			$keys = array_keys($sticky['value']);
			foreach ($keys as $i) {
				$ann = new \stdClass();
				$ann->id = $sticky['id'][$i];
				$ann->name = $sticky['name'][$i];
				$ann->value = $sticky['value'][$i];
				$ann->access_id = $sticky['access_id'][$i];
				$ann->owner_guid = $sticky['owner_guid'][$i];

				$values[$i] = $ann;
			}
		} else if ($entity->guid) {
			$values = elgg_get_annotations(array(
				'guids' => (int) $entity->guid,
				'metadata_names' => $this->getShortname(),
				'limit' => 0,
			));
		}

		if (empty($values)) {
			$ann = new \stdClass();
			$ann->value = $this->getDefaultValue();
			$values = array($ann);
		}

		return array_values($values);
	}
{@inheritdoc}