Используйте:
use yii\helpers\StringHelper;
Например:
$shortName = StringHelper::truncate($album['name'], 240);