public function getWithRelation($actionName)
    {
        $rel = $this->withRelations();
        
        $expand = Yii::$app->request->get('expand', null);
        $relationPrefixes = [];
        foreach (StringHelper::explode($expand, ',', true, true) as $relation) {
            // check for subrelation dot notation.
            $relationPrefixes[] = current(explode(".", $relation));
        }

        // no expand param found, return empty join with array.
        if (empty($relationPrefixes)) {
            return [];
        }

        foreach ($rel as $relationName) {
            // it seem to be the advance strucutre for given actions.
            if (is_array($relationName) &&  isset($rel[$actionName])) {
                return $this->relationsFromExpand($rel[$actionName], $relationPrefixes);
            }
        }
        // simple structure
        return $this->relationsFromExpand($rel, $relationPrefixes);
    }