Return the definition of the properties of this model.

@return array
966591
protected static function define_properties() {
        return [
            'name' => [
                'type' => PARAM_TEXT,
                'default' => '',
            ],
            'type' => [
                'type' => PARAM_INT,
                'choices' => [
                    self::TYPE_SITE,
                    self::TYPE_PRIVACY,
                    self::TYPE_THIRD_PARTY,
                    self::TYPE_OTHER,
                ],
                'default' => self::TYPE_SITE,
            ],
            'audience' => [
                'type' => PARAM_INT,
                'choices' => [
                    self::AUDIENCE_ALL,
                    self::AUDIENCE_LOGGEDIN,
                    self::AUDIENCE_GUESTS,
                ],
                'default' => self::AUDIENCE_ALL,
            ],
            'archived' => [
                'type' => PARAM_BOOL,
                'default' => false,
            ],
            'policyid' => [
                'type' => PARAM_INT,
            ],
            'agreementstyle' => [
                'type' => PARAM_INT,
                'choices' => [
                    self::AGREEMENTSTYLE_CONSENTPAGE,
                    self::AGREEMENTSTYLE_OWNPAGE,
                ],
                'default' => self::AGREEMENTSTYLE_CONSENTPAGE,
            ],
            'optional' => [
                'type' => PARAM_INT,
                'choices' => [
                    self::AGREEMENT_OPTIONAL,
                    self::AGREEMENT_COMPULSORY,
                ],
                'default' => self::AGREEMENT_COMPULSORY,
            ],
            'revision' => [
                'type' => PARAM_TEXT,
                'default' => '',
            ],
            'summary' => [
                'type' => PARAM_RAW,
                'default' => '',
            ],
            'summaryformat' => [
                'type' => PARAM_INT,
                'default' => FORMAT_HTML,
                'choices' => [
                    FORMAT_PLAIN,
                    FORMAT_HTML,
                    FORMAT_MOODLE,
                    FORMAT_MARKDOWN,
                ],
            ],
            'content' => [
                'type' => PARAM_RAW,
                'default' => '',
            ],
            'contentformat' => [
                'type' => PARAM_INT,
                'default' => FORMAT_HTML,
                'choices' => [
                    FORMAT_PLAIN,
                    FORMAT_HTML,
                    FORMAT_MOODLE,
                    FORMAT_MARKDOWN,
                ],
            ],
        ];
    }
1076522
public function toArray()
    {
        $properties = $this->properties;

        foreach ($properties as $name => $value) {
            if ($value instanceof Entity) {
                $properties[$name] = $value->toArray();
            }
        }

        return $properties;
    }
695040
protected function propertiesFromAttributes(): array
    {
        // Get all managed properties
        $propertyNames = $this->entityMap->getProperties();

        $propertyAttributes = array_only($this->attributes, $propertyNames);
        $attributesArray = array_except($this->attributes, $propertyNames);

        $attributesArrayName = $this->entityMap->getAttributesArrayName();

        if ($attributesArrayName) {
            $propertyAttributes[$attributesArrayName] = $attributesArray;
        }

        return $propertyAttributes;
    }
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;
    }
67485
protected static function define_other_properties() {
        return [
            'id' => ['type' => PARAM_INT],
            'state' => [
                'type' => [
                    'groupmode' => ['type' => PARAM_INT],
                ],
            ],
            'userstate' => [
                'type' => [
                    'tracked' => ['type' => PARAM_INT],
                ],
            ],
            'capabilities' => [
                'type' => [
                    'viewdiscussions' => ['type' => PARAM_BOOL],
                    'create' => ['type' => PARAM_BOOL],
                    'subscribe' => ['type' => PARAM_BOOL],
                ]
            ],
            'urls' => [
                'type' => [
                    'create' => ['type' => PARAM_URL],
                    'markasread' => ['type' => PARAM_URL],
                    'view' => ['type' => PARAM_URL],
                    'sortrepliesasc' => ['type' => PARAM_URL],
                    'sortrepliesdesc' => ['type' => PARAM_URL],
                    'sortlastpostasc' => ['type' => PARAM_URL],
                    'sortlastpostdesc' => ['type' => PARAM_URL],
                    'sortcreatedasc' => ['type' => PARAM_URL],
                    'sortcreateddesc' => ['type' => PARAM_URL],
                ],
            ],
        ];
    }
433810
public function getComputedProperties()
    {
        $result = array();

        if($entity = $this->getIterator()->current()) {
            $result = $entity->getComputedProperties();
        }

        return $result;
    }
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);
    }
1355037
public function properties()
    {
        return array(
            'nb' => $this->archive->numFiles,
            'comment' =>
                (($comment = $this->archive->getArchiveComment() !== false)
                    ? $comment : null),
            'status' => 'OK',
        );
    }
33147
public function getComputedProperties()
    {
        if (!$this->__computed_properties)
        {
            $properties = array();

            foreach ($this->getMethods() as $method)
            {
                if (substr($method, 0, 11) == 'getProperty' && $method !== 'getProperty')
                {
                    $property = StringInflector::underscore(substr($method, 11));
                    $properties[$property] = $property;
                }
            }

            $this->__computed_properties = $properties;
        }

        return $this->__computed_properties;
    }
700694
protected static function define_properties() {
        return [
            'id' => [
                'type' => PARAM_INT,
                'description' => 'Tag id.',
            ],
            'name' => [
                'type' => PARAM_TAG,
                'description' => 'Tag name.',
            ],
            'rawname' => [
                'type' => PARAM_RAW,
                'description' => 'The raw, unnormalised name for the tag as entered by users.',
            ],
            'isstandard' => [
                'type' => PARAM_BOOL,
                'description' => 'Whether this tag is standard.',
                'default' => false,
            ],
            'tagcollid' => [
                'type' => PARAM_INT,
                'description' => 'Tag collection id.',
            ],
            'taginstanceid' => [
                'type' => PARAM_INT,
                'description' => 'Tag instance id.',
            ],
            'taginstancecontextid' => [
                'type' => PARAM_INT,
                'description' => 'Context the tag instance belongs to.',
            ],
            'itemid' => [
                'type' => PARAM_INT,
                'description' => 'Id of the record tagged.',
            ],
            'ordering' => [
                'type' => PARAM_INT,
                'description' => 'Tag ordering.',
            ],
            'flag' => [
                'type' => PARAM_INT,
                'description' => 'Whether the tag is flagged as inappropriate.',
                'default' => 0,
                'null' => NULL_ALLOWED,
            ],
        ];
    }
544621
public function getProperties()
    {
        //$properties     = parent::getProperties();
        
        $moufProperties = array();
        foreach ($this->xmlRoot->property as $property) {
            $moufProperties[] = new MoufXmlReflectionProperty($this, $property);
        }
        
        return $moufProperties;
    }
44859
public function getComputedProperties()
    {
        $result = array();

        if($row = $this->getIterator()->current()) {
            $result = $row->getComputedProperties();
        }

        return $result;
    }
125530
protected static function define_properties() {
        return array(
            'userid' => array(
                'type' => PARAM_INT,
            ),
            'competencyid' => array(
                'type' => PARAM_INT,
            ),
            'proficiency' => array(
                'type' => PARAM_BOOL,
                'default' => null,
                'null' => NULL_ALLOWED,
            ),
            'grade' => array(
                'type' => PARAM_INT,
                'default' => null,
                'null' => NULL_ALLOWED,
            ),
            'planid' => array(
                'type' => PARAM_INT,
            ),
            'sortorder' => array(
                'type' => PARAM_INT,
                'default' => 0,
            ),
        );
    }
1137743
protected static function define_properties() {
        return array(
            'sourcefileid' => [
                'type' => PARAM_INT,
            ],
            'targetformat' => [
                'type' => PARAM_ALPHANUMEXT,
            ],
            'status' => [
                'type' => PARAM_INT,
                'choices' => [
                    self::STATUS_PENDING,
                    self::STATUS_IN_PROGRESS,
                    self::STATUS_COMPLETE,
                    self::STATUS_FAILED,
                ],
                'default' => self::STATUS_PENDING,
            ],
            'statusmessage' => [
                'type' => PARAM_RAW,
                'null' => NULL_ALLOWED,
                'default' => null,
            ],
            'converter' => [
                'type' => PARAM_RAW,
                'null' => NULL_ALLOWED,
                'default' => null,
            ],
            'destfileid' => [
                'type' => PARAM_INT,
                'null' => NULL_ALLOWED,
                'default' => null,
            ],
            'data' => [
                'type' => PARAM_RAW,
                'null' => NULL_ALLOWED,
                'default' => null,
            ],
        );
    }
1089390
public function getProperties()
    {
        //todo cache
        $result = array();
        foreach ($this->getReflectionClass()->getProperties() as $m)
        {
            $result[] = PropertyInfo::__internal_create($this, $m);
        }
        return $result;
    }
1010107
private function getMetadataProperties()
    {
        $triples = $this->getResource()->getRdfTriples();
        $properties = [];
        foreach ($triples as $triple){
            $properties[$triple->predicate] = $triple->object;
        }
        //we also include a shortcut to the item URI
        $properties['@uri'] = $this->getResource()->getUri();
        return $properties;
    }
1112236
protected static function define_properties() {
        return [
            'id' => [
                'type' => PARAM_INT,
                'description' => 'Alignment id',
            ],
            'badgeid' => [
                'type' => PARAM_INT,
                'description' => 'Badge id',
            ],
            'targetname' => [
                'type' => PARAM_TEXT,
                'description' => 'Target name',
            ],
            'targeturl' => [
                'type' => PARAM_URL,
                'description' => 'Target URL',
            ],
            'targetdescription' => [
                'type' => PARAM_TEXT,
                'description' => 'Target description',
                'null' => NULL_ALLOWED,
                'optional' => true,
            ],
            'targetframework' => [
                'type' => PARAM_TEXT,
                'description' => 'Target framework',
                'null' => NULL_ALLOWED,
                'optional' => true,
            ],
            'targetcode' => [
                'type' => PARAM_TEXT,
                'description' => 'Target code',
                'null' => NULL_ALLOWED,
                'optional' => true,
            ]
        ];
    }