This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* This file is part of the Sonata package. | |
* | |
* (c) Thomas Rabaix <[email protected]> | |
* | |
* For the full copyright and license information, please view the LICENSE | |
* file that was distributed with this source code. | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* This file is part of the Sonata package. | |
* | |
* (c) Thomas Rabaix <[email protected]> | |
* | |
* For the full copyright and license information, please view the LICENSE | |
* file that was distributed with this source code. | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% set form %} | |
{% block form %}{% endblock %} | |
{% endset %} | |
{% if form|length > 0 %} | |
<div class="sonata-ba-form"> | |
{{ form|raw }} | |
</div> | |
{% endif %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sonata_media: | |
contexts: | |
defaults: | |
providers: | |
- sonata.media.provider.dailymotion | |
- sonata.media.provider.youtube | |
- sonata.media.provider.image | |
- sonata.media.provider.file | |
formats: | |
small: { width: 100 , quality: 70} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sonata_media: | |
contexts: | |
defaults: | |
providers: | |
- sonata.media.provider.dailymotion | |
- sonata.media.provider.youtube | |
- sonata.media.provider.image | |
- sonata.media.provider.file | |
news: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
id : sonata.news.admin.post | |
Model : Application\Sonata\NewsBundle\Entity\Post | |
Controller : SonataNewsBundle:PostAdmin | |
Routes | |
- admin_sonata_news_post_list | |
- admin_sonata_news_post_create | |
- admin_sonata_news_post_update | |
- admin_sonata_news_post_batch | |
- admin_sonata_news_post_edit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$steps->And('/^I press item "([^"]*)"$/', function($world, $xpath) { | |
$button = $world->getSession()->getDriver()->find($xpath); | |
$button = count($button) > 0 ? current($button) : null; | |
if (null === $button) { | |
throw new ElementNotFoundException('button', $xpath); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sonata_admin: | |
access_control: | |
- { path: ^/admin/sonata/media/media/list$, roles: [ROLE_SONATA_MEDIA_ADMIN_MEDIA_LIST], methods: null } | |
- { path: ^/admin/sonata/media/media/create$, roles: [ROLE_SONATA_MEDIA_ADMIN_MEDIA_CREATE], methods: null } | |
- { path: ^/admin/sonata/media/media/update$, roles: [ROLE_SONATA_MEDIA_ADMIN_MEDIA_UPDATE], methods: null } | |
- { path: ^/admin/sonata/media/media/batch$, roles: [ROLE_SONATA_MEDIA_ADMIN_MEDIA_BATCH], methods: null } | |
- { path: ^/admin/sonata/media/media/(?P[^/]+?)/edit$, roles: [ROLE_SONATA_MEDIA_ADMIN_MEDIA_EDIT], methods: null } | |
- { path: ^/admin/sonata/media/media/(?P[^/]+?)/delete$, roles: [ROLE_SONATA_MEDIA_ADMIN_MEDIA_DELETE], methods: null } | |
- { path: ^/admin/sonata/media/media/(?P[^/]+?)/view$, roles: [ROLE_SONATA_MEDIA_ADMIN_MEDIA_VIEW], methods: null } | |
- { path: ^/admin/sonata/media/gallery/list$, roles: [ROLE_SONATA_MEDIA_ADMIN_GALLERY_LIST], methods: null } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
With : | |
$this->get('doctrine.orm.default_entity_manager')->find('Application\Sonata\NewsBundle\Entity\Comment', 1); | |
$this->get('doctrine.orm.default_entity_manager')->find('Application\Sonata\NewsBundle\Entity\Post', 5); | |
Then only 1 query : | |
63 Query SELECT t0.name AS name1, t0.url AS url2, t0.email AS email3, t0.message AS message4, t0.status AS status5, t0.created_at AS created_at6, t0.updated_at AS updated_at7, t0.id AS id8, t0.post_id AS post_id9 FROM news__comment t0 WHERE t0.id = 1 | |
With : | |
$this->get('doctrine.orm.default_entity_manager')->find('Application\Sonata\NewsBundle\Entity\Post', 5); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" ?> | |
<constraint-mapping xmlns="http://symfony.com/schema/dic/constraint-mapping" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://symfony.com/schema/dic/constraint-mapping | |
http://symfony.com/schema/dic/services/constraint-mapping-1.0.xsd"> | |
<class name="Application\Sonata\NewsBundle\Entity\Post"> | |
<getter property="title"> | |
<constraint name="NotBlank" /> |