public function _provider($from, $to, $action)
{
switch ($action) {
case static::ACT_CONVERT_TO_OBJECT:
/* @var $from Entity\CloudCredentials */
$to->provider = $from->cloud;
break;
case static::ACT_CONVERT_TO_ENTITY:
/* @var $to Entity\CloudCredentials */
break;
case static::ACT_GET_FILTER_CRITERIA:
return [['cloud' => $this->getCloudstackProvider($from)]];
}
}