public function getContentByType($type, $father = null, $region = null)
    {
        $array = [];
        $type = $this->type->findOneBy(['name' => $type]);

        if ($type) {
            if ($father) {
                $father = $this->content->find($father);
                $first = $this->subContent->findOneBy(
                    ['back' => null, 'father' => $father]
                );
            } else {
                $first = $this->contentType->findOneBy(
                    ['back' => null, 'type' => $type]
                );
            }

            if ($first) {
                for ($i = 0; $i < $type->getMaxContentPage() && null !== $first; ++$i) {
                    $variables = [];
                    $variables['content'] = $first->getContent();
                    $variables['size'] = $first->getSize();
                    $variables['type'] = $type->getName();
                    if (!$father) {
                        $variables['collapse'] = $first->isCollapse();
                    }
                    $variables = $this->homeService->isDefinedPush($variables, 'father', $father, 'getId');
                    $variables = $this->homeService->isDefinedPush($variables, 'region', $region);
                    $array[] = $variables;
                    $first = $first->getNext();
                }
            } else {
                $array[] = ['content' => '', 'type' => $type->getName()]; // in case of not yet content
            }
        }

        return $array;
    }