PHPackages                             domstor-project/template-standard - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. domstor-project/template-standard

ActiveProject

domstor-project/template-standard
=================================

The "Domstor Template Standard" distribution

1.8.0(8y ago)0831MITCSSPHP &gt;=7.1

Since Sep 12Pushed 8y agoCompare

[ Source](https://github.com/domstor-project/template-standard)[ Packagist](https://packagist.org/packages/domstor-project/template-standard)[ RSS](/packages/domstor-project-template-standard/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (16)Versions (17)Used By (0)

Domstor Template Standard
=========================

[](#domstor-template-standard)

Требования
----------

[](#требования)

PHP&gt;=7.1

Установка
---------

[](#установка)

1. `composer create-project domstor-project/template-standard`
2. Обязательно указать параметр `mailer_user`
3. Параметр `mailer_request_recipients` вводится в формате \['', ''\]
4. Указать параметр `default_timezone`. Например: `Asia/Krasnoyarsk`, `Asia/Novosibirsk`
5. Отредактировать файл `app/AppKernel.php`. В строчке `date_default_timezone_set('Asia/Novosibirsk');` заменить временную зону на соответствующую введеной в предыдущем пункте
6. Выставить права на var/logs и var/cache. Подробнее [Symfony Documentation](https://symfony.com/doc/current/setup/file_permissions.html).
7. Выполнить `php bin/console d:d:c` для создания базы данных
8. Выполнить `php bin/console d:s:u --force` для обновления схемы базы
9. Выполнить `php bin/console cache:clear` для очистки кэша
10. Выполнить `php bin/console fos:js-routing:dump` для выгрузки роутов Symfony в JS
11. Выполнить `php bin/console assetic:dump` для выгрузки ассетов
12. Создать папку web/uploads и установить права `sudo chown -R www-data:www-data /path/to/project-folder/web/uploads` `sudo chmod -R 755 /path/to/project-folder/web/uploads`
13. Создать пользователя для доступа к системе администрирования `php bin/console fos:user:create` и `php bin/console fos:user:promote admin_user_name ROLE_SUPER_ADMIN`

Настройка
---------

[](#настройка)

Необходимо настроить DomstorTemplateBundle. Пример настроек:

```
domstor_template:
    domstorlib:
        builder:
            org_id: 13 #Идентификатор вашей организации в системе Домстор
            location_id: 2004 #Идентификатор города в системе Домстор. 2004 - Кемерово, 2006 - Новокузнецк, 2236 - Новосибирск
            cache:
              type: 'file' #Тип кэширования. Поддерживаются: file, apc, array, xcache, memcache
              time: 86400 #Время жизни кэша
              uniq_key: '13' #Уникальный ключ хэша
              options:
                directory: '%kernel.cache_dir%' #Директория, где хранится кэш объектов
            filter:
              template_dir: '%kernel.root_dir%/../src/AppBundle/Resources/views/Filters'
        links: #Список населенных пунктов для поиска недвижимости
            2004: 'Недвижимость в Кемерово'
            43: 'Недвижимость в Кемеровской области'
    mailer:
        request:
            service: 'default' #mailer-сервис, через который будут отправляться сообщения о поступлении новых заявок
            to: '%mailer_request_recipients%' #Получатели рассылки о новых заявках
            from: '%mailer_request_from%' #От кого будут приходить заявки
            subject: '%mailer_request_subject%' #Тема письма для заявки
            email_template: 'DomstorTemplateBundle:Email:email_request.html.twig' #Шаблон письма

    title:
        objects: #Заголовки пунктов для меню недвижимости
            flat: 'Квартиры'
            house: 'Дома и коттеджи'
            land: 'Земля и дачи'
            garage: 'Гаражи и парковки'
            office: 'Офисная'
            trade: 'Торговая'
            product: 'Производственная'
            storehouse: 'Складская'
            landcom: 'Земля'
            other: 'Прочее'
            complex: 'Имущественные'
        objectsHtml: #Заголовки пунктов для меню недвижимости с возможностью использовать html теги
            flat: 'Квартиры'
            house: 'ДомаКоттеджи'
            land: 'ДачиЗемля'
            garage: 'ГаражиПарковки'
            office: 'Офисная'
            trade: 'Торговая'
            product: 'Производственная'
            storehouse: 'Складская'
            landcom: 'Земля'
            other: 'Прочее'
            complex: 'Имущественные'
        actions: #Заголовки разделов
            sale: 'Продают'
            rent: 'Сдают'
            purchase: 'Купят'
            rentuse: 'Снимут'
            exchange: 'Обмен'
            new: 'Новостройки'
```

Блоки на главной странице
-------------------------

[](#блоки-на-главной-странице)

Все доступные в системе блоки представлены в `AppBundle:Home:index.html.twig`

```
{% block content %}
    {{ sonata_block_render({'type':'domstor.template.block.home.slider.service'}) }}
    {{ sonata_block_render({'type':'domstor.template.block.home.special_offer.service'}) }}
    {{ sonata_block_render({'type':'domstor.template.block.home.urgent_sale.service'}) }}
    {{ sonata_block_render({'type':'domstor.template.block.home.review.service'}) }}
    {{ sonata_block_render({'type':'domstor.template.block.home.employee.service'}) }}
    {{ sonata_block_render({'type':'domstor.template.block.home.partner.service'}) }}
    {{ sonata_block_render({'type':'domstor.template.block.home.vacancy.service'}) }}
    {{ sonata_block_render({'type':'domstor.template.block.home.post.service'}) }}
{% endblock %}
```

Что бы убрать блок с главной страницы, достаточно удалить строку с его вызовом. В этом случае запросов к БД идти не будет. В системе администрирования, однако, останется возможность добавлять записи в этот блок. По-умолчанию, блок выводит 100 записей. Для того, что бы настроить количество отображаемых блоком записей, необходимо вызвать блок вот так:

```
{{ sonata_block_render({'type':'domstor.template.block.home.vacancy.service'},  {'count':1}) }}
```

В этом случае в блоке будет выведена только одна запись.

Существует возможность вывести блок формы поиска недвижимости:

```
{{ sonata_block_render(
        { 'type':'domstor.template.block.domstor_filter.service' },
        { 'object':'flat', 'action':'sale', 'form_action_route':'app_objects_list', 'filter_template_dir': '@AppBundle/Resources/views/HomeFilters' }
    ) }}
```

`object` - тип недвижимости, `action` - категория, `form_action_route` - имя роута страницы поиска недвижимости. `filter_template_dir` - опциональный параметр, позволяет указать отдельную папку с шаблонами формы поиска, если не передан этот параметр в блок, то берется значение из `domstor_template.domstorlib.builder.filter_template_dir`. Поддерживается указание пути с @.

Статические страницы без контроллера
------------------------------------

[](#статические-страницы-без-контроллера)

Существует возможность добавлять статические страницы, без создания контроллера. Достаточно сделать twig-шаблон и прописать необходимые настройки в конфигурацию. В качестве примера используется страница "О компании": Добавим запись в `AppBundle/Resources/config/static_routing.yml`

```
app_static_about: #Название роута для Symfony Routing
    path: /about #Путь к странице в адресной строке
    defaults:
        _controller: FrameworkBundle:Template:template #Обязательная строка для страницы без контроллера
        template:    AppBundle:Static:about.html.twig #Шаблон страницы
```

Управление отображением разделов в системе администрирования
------------------------------------------------------------

[](#управление-отображением-разделов-в-системе-администрирования)

Существует возможность скрыть раздел из системы администрирования. Все доступные разделы находятся в файле `app/config/sonata/admin.yml`. Для того, что бы скрыть раздел, достаточно закомментировать строку.

```
sonata_admin:
    security:
        handler: sonata.admin.security.handler.role
    title:      Кано
    title_logo: /../bundles/app/images/template/logo.png
    templates:
        # default global templates
        layout:    SonataAdminBundle::layout.html.twig

    dashboard:
        blocks:
            # display a dashboard block
            - { position: left, type: sonata.admin.block.admin_list }
        groups:
        domstor_template:
                keep_open:            true
                label_catalogue:      messages
                items:
                    - domstor.template.admin.slider #Слайдер
                    - domstor.template.admin.special_offer #Специальные предложения
                    - domstor.template.admin.urgent_sale #Срочная продажа
                    - domstor.template.admin.review #Отзывы
                    - domstor.template.admin.employee #Сотрудники
                    - domstor.template.admin.partner #Партнеры
                    - domstor.template.admin.vacancy #Вакансии
                    - domstor.template.admin.post #Новости
```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~9 days

Recently: every ~29 days

Total

16

Last Release

3020d ago

PHP version history (2 changes)1.0PHP &gt;=7.0

1.6.0PHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/4f43088d4706a928d5ce9a2780d9f5d03cedd432b12b9648fec0ca10ea9d7111?d=identicon)[DrBallMD](/maintainers/DrBallMD)

![](https://www.gravatar.com/avatar/aab88f6ef9fe0832640684b81b594c886b9a8e23ecac686cf58a4bb7db240008?d=identicon)[aosivt](/maintainers/aosivt)

---

Top Contributors

[![anikeevda](https://avatars.githubusercontent.com/u/8522321?v=4)](https://github.com/anikeevda "anikeevda (18 commits)")

### Embed Badge

![Health badge](/badges/domstor-project-template-standard/health.svg)

```
[![Health](https://phpackages.com/badges/domstor-project-template-standard/health.svg)](https://phpackages.com/packages/domstor-project-template-standard)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
