Elgg\Database\PrivateSettingsTable::getAll PHP Method

getAll() public method

Return an array of all private settings.
public getAll ( integer $entity_guid ) : string[]
$entity_guid integer The entity GUID
return string[] empty array if no settings
    public function getAll($entity_guid)
    {
        if (!$this->entities->exists($entity_guid)) {
            return [];
        }
        $query = "\n\t\t\tSELECT * FROM {$this->table}\n\t\t\tWHERE entity_guid = :entity_guid\n\t\t";
        $params = [':entity_guid' => (int) $entity_guid];
        $result = $this->db->getData($query, null, $params);
        $return = [];
        if ($result) {
            foreach ($result as $r) {
                $return[$r->name] = $r->value;
            }
        }
        return $return;
    }