Get notes.

@return array

@VirtualProperty
@SerializedName("notes")
@Groups({"fullContact"})
180404
public function getNotes()
    {
        $entities = [];
        if ($this->entity->getNotes()) {
            foreach ($this->entity->getNotes() as $note) {
                $entities[] = $note;
            }
        }

        return $entities;
    }
213514
public static function get_notes_returns() {
        return new external_single_structure(
            array(
                'notes' => new external_multiple_structure(
                    new external_single_structure(
                        array(
                            'noteid' => new external_value(PARAM_INT, 'id of the note', VALUE_OPTIONAL),
                            'userid' => new external_value(PARAM_INT, 'id of the user the note is about', VALUE_OPTIONAL),
                            'publishstate' => new external_value(PARAM_ALPHA, '\'personal\', \'course\' or \'site\'', VALUE_OPTIONAL),
                            'courseid' => new external_value(PARAM_INT, 'course id of the note', VALUE_OPTIONAL),
                            'text' => new external_value(PARAM_RAW, 'the text of the message - text or HTML', VALUE_OPTIONAL),
                            'format' => new external_format_value('text', VALUE_OPTIONAL),
                        ), 'note'
                    )
                 ),
                 'warnings' => new external_warnings('item is always \'note\'',
                        'When errorcode is savedfailed the note could not be modified.' .
                        'When errorcode is badparam, an incorrect parameter was provided.' .
                        'When errorcode is badid, the note does not exist',
                        'errorcode can be badparam (incorrect parameter), savedfailed (could not be modified), or badid (note does not exist)')
            )
        );
    }
456649
public String getNotes()
   {
      String notes = (String) getCachedValue(ResourceField.NOTES);
      return (notes == null ? "" : notes);
   }
1290536
public function getProperties()
    {
        if ($this->properties === null) {
            // lazy load class properties list
            $this->properties = array();
            foreach ($this->node->stmts as $stmt) {
                if ($stmt instanceof Node\Stmt\Property) {
                    $this->properties[] = new PropertyModel($this, $stmt);
                }
            }
        }
        return array_values($this->properties);
    }
1301269
public function getProperties()
    {
        $properties = [];

        foreach ($this->audios as $audio) {
            $properties = array_merge($properties, $audio->getProperties());
        }
        
        if ($this->title !== null) {
            $properties[] = new Property(Property::TITLE, $this->title);
        }

        if ($this->description !== null) {
            $properties[] = new Property(Property::DESCRIPTION, $this->description);
        }

        if ($this->determiner !== null) {
            $properties[] = new Property(Property::DETERMINER, $this->determiner);
        }

        foreach ($this->images as $image) {
            $properties = array_merge($properties, $image->getProperties());
        }

        if ($this->locale !== null) {
            $properties[] = new Property(Property::LOCALE, $this->locale);
        }

        foreach ($this->localeAlternate as $locale) {
            $properties[] = new Property(Property::LOCALE_ALTERNATE, $locale);
        }

        if ($this->richAttachment !== null) {
            $properties[] = new Property(Property::RICH_ATTACHMENT, (int)$this->richAttachment);
        }

        foreach ($this->seeAlso as $seeAlso) {
            $properties[] = new Property(Property::SEE_ALSO, $seeAlso);
        }

        if ($this->siteName !== null) {
            $properties[] = new Property(Property::SITE_NAME, $this->siteName);
        }

        if ($this->type !== null) {
            $properties[] = new Property(Property::TYPE, $this->type);
        }

        if ($this->updatedTime !== null) {
            $properties[] = new Property(Property::UPDATED_TIME, $this->updatedTime->format("c"));
        }

        if ($this->url !== null) {
            $properties[] = new Property(Property::URL, $this->url);
        }

        foreach ($this->videos as $video) {
            $properties = array_merge($properties, $video->getProperties());
        }

        return $properties;
    }
1355037
public function properties()
    {
        return array(
            'nb' => $this->archive->numFiles,
            'comment' =>
                (($comment = $this->archive->getArchiveComment() !== false)
                    ? $comment : null),
            'status' => 'OK',
        );
    }
614740
public function toArray()
	{
		$properties = parent::toArray();

		$properties[$this->_prefix . 'refid'] = $this->getRefId();
		$properties[$this->_prefix . 'position'] = $this->getPosition();

		return $properties;
	}
672667
public function properties() {
    $props = array();

    if ($this->itemScope()) {
      $toTraverse = array($this);

      foreach ($this->itemRef() as $itemref) {
        $children = $this->ownerDocument->xpath()->query('//*[@id="'.$itemref.'"]');
        foreach($children as $child) {
          $this->traverse($child, $toTraverse, $props, $this);
        }
      }
      while (count($toTraverse)) {
        $this->traverse($toTraverse[0], $toTraverse, $props, $this);
      }
    }

    return $props;
  }
598183
public function getProperties()
    {
        $properties = [];

        // URL must precede all other properties
        if ($this->url !== null) {
            $properties[] = new Property(Property::VIDEO_URL, $this->url);
        }

        if ($this->height !== null) {
            $properties[] = new Property(Property::VIDEO_HEIGHT, $this->height);
        }

        if ($this->secureUrl !== null) {
            $properties[] = new Property(Property::VIDEO_SECURE_URL, $this->secureUrl);
        }

        if ($this->type !== null) {
            $properties[] = new Property(Property::VIDEO_TYPE, $this->type);
        }

        if ($this->width !== null) {
            $properties[] = new Property(Property::VIDEO_WIDTH, $this->width);
        }

        return $properties;
    }
1177854
public function getProperties(): array
    {
        return get_parent_class(__CLASS__) !== false
            ? array_unique(array_merge($this->properties, parent::getProperties()))
            : $this->properties;
    }
807981
public function getCampaignSeries()
    {
        $locationFacts = $this->getLocationFacts();
        $seriesData = [];
        $metricIds = [];

        foreach ($locationFacts as $locationFact) {
            $factsData = $this->getFacts($locationFact->getLocation());
            $seriesData[] = [
                'location' => $locationFact->getLocation(),
                'dimensions' => $factsData,
            ];

            $usedMetricIds = array_keys($factsData);
            foreach ($usedMetricIds as $metricId) {
                if (in_array($metricId, $metricIds)) {
                    continue;
                }
                $metricIds[] = $metricId;
            }
        }

        return [
            'data' => $seriesData,
            'metricNames' => $this->getMetricNamesById($metricIds),
        ];
    }
692185
public function getFormFields(): array
    {
        $properties = $this->getProperties();

        $fields = array_diff($properties, ['id']);

        $fieldsWithTypes = [];
        foreach ($fields as $field) {
            $fieldsWithTypes[$field] = null;
        }

        return $fieldsWithTypes;
    }
1338058
public function getNotes()
    {
        $plugin = Eresus_Kernel::app()->getLegacyKernel()->plugins->load('html');
        $table = ORM::getTable($plugin, 'Page');
        /** @var Html_Entity_Page $page */
        $page = $table->find($this->raw['id']);
        if (is_null($page))
        {
            return '';
        }
        return $page->notes;
    }
1248232
final public function getAttachments(): array
    {
        if (null === $this->attachments) {
            $this->attachments = self::gatherAttachments($this);
        }

        return $this->attachments;
    }
1261604
public function get_computed_keys() {
		if ( isset( self::$memo[ get_called_class() ][ __METHOD__ ] ) ) {
			return self::$memo[ get_called_class() ][ __METHOD__ ];
		}

		$keys = array();

		foreach ( $this->get_attribute_keys() as $key ) {
			if ( $this->has_compute_method( $key ) ) {
				$keys[] = $key;
			}
		}

		return self::$memo[ get_called_class() ][ __METHOD__ ] = $keys;
	}
789457
public function properties()
    {
        if ($this->properties === null) {
            $model = $this->proto();
            $props = $model->metadata()->properties();

            $collectionIdent = $this->collectionIdent();
            if ($collectionIdent) {
                $metadata      = $model->metadata();
                $adminMetadata = isset($metadata['admin']) ? $metadata['admin'] : null;

                if (isset($adminMetadata['lists'][$collectionIdent]['properties'])) {
                    // Flipping to have property ident as key
                    $listProperties = array_flip($adminMetadata['lists'][$collectionIdent]['properties']);
                    // Replacing values of listProperties from index to actual property values
                    $props = array_replace($listProperties, $props);
                    // Get only the keys that are in listProperties from props
                    $props = array_intersect_key($props, $listProperties);
                }
            }

            $this->properties = $props;
        }

        return $this->properties;
    }
216322
private function totalNotes(): Collection
    {
        return DB::table('gedcom')
            ->leftJoin('other', static function (JoinClause $join): void {
                $join
                    ->on('o_file', '=', 'gedcom_id')
                    ->where('o_type', '=', 'NOTE');
            })
            ->groupBy('gedcom_id')
            ->pluck(DB::raw('COUNT(o_id)'), 'gedcom_id')
            ->map(static function (string $count) {
                return (int) $count;
            });
    }