//Говорящие названия - такие говорящие!
function asdfasdf (WebAPI_Entity $screenshot_dictionary)
{
$result = array();
foreach ($screenshot_dictionary->getEntities () as $scr)
{
$result [] = $scr->toObject ();
}
usort($result, array ($this, 'sortScreenshots'));
return $this->prepare_screenshots ($result);
}
// вставляем остальные скриншоты
$elements = $this->asdfasdf ($screenshot_dictionary);