/**
* Return the values of the variables specified in the plugin configuration.
*
* @return array
* An associative array where the keys are the variables specified in the
* plugin configuration and the values are the values found in the source.
* A key/value pair is added for the language code. Only those values are
* returned that are actually in the database.
*/
protected function values() { $values =
[];
$result =
$this->
prepareQuery()->
execute()->
FetchAllAssoc('realm_key'
);
foreach ($result as $variable_store) { $values[]['language'
] =
$variable_store['realm_key'
];
} $result =
$this->
prepareQuery()->
execute()->
FetchAll();
foreach ($result as $variable_store) { foreach ($values as $key =>
$value) { if ($values[$key]['language'
] ===
$variable_store['realm_key'
]) { if ($variable_store['serialized'
]) { $values[$key][$variable_store['name'
]] =
unserialize($variable_store['value'
]);
break;
}