public function _instance($from, $to, $action)
{
switch ($action) {
case static::ACT_CONVERT_TO_OBJECT:
/* @var $from FarmRole */
$to->instance = static::getInstanceConfiguration($from);
break;
case static::ACT_CONVERT_TO_ENTITY:
/* @var $to FarmRole */
static::setupInstanceConfiguration($to, $from->instance);
break;
case static::ACT_GET_FILTER_CRITERIA:
return [[]];
}
}