symfony-sonata

Extending Sonata User Bundle and adding new fields [closed]

谁都会走 提交于 2019-12-17 10:48:07
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 6 years ago . I am extending the Sonata User Bundle and creating some extra fields in the new user entity. These fields will only be updated within the Sonata admin area under users so they do not need to be available in the

Symfony2 Sonata: No Entity Manager in Custom Class

百般思念 提交于 2019-12-13 21:35:06
问题 I'm trying to create custom Form in Sonata-Admin and Im geting No entity manager defined for class School\ChildBirthBundle\Entity\DataChapter My code: namespace School\ChildBirthBundle\Admin; use Sonata\AdminBundle\Admin\Admin; use Sonata\AdminBundle\Form\FormMapper; use Sonata\AdminBundle\Datagrid\DatagridMapper; use Sonata\AdminBundle\Datagrid\ListMapper; use Sonata\AdminBundle\Show\ShowMapper; use Knp\Menu\ItemInterface as MenuItemInterface; use School\ChildBirthBundle\Entity\DataChapter;

What is “sonata.block.container.types” parameter in SonataPageBundle

穿精又带淫゛_ 提交于 2019-12-13 21:10:03
问题 I installed SonataPageBundle via composer: "sonata-project/page-bundle": "dev-master", After installation and making all steps from official tutorial I encountered this error: [Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException] The service "sonata.page.admin.block" has a dependency on a non-existent parameter "sonata.block.container.types". Did you mean this: "sonata.page.block.container.class"? I did not find any information about this parameter in documentation.

oneToMany relation entity does not save id field

孤者浪人 提交于 2019-12-13 17:24:30
问题 I'm trying to manage a oneToMany relation with sonata admin Actually I'd like to have manyToMany relation like sonata media bundle has with gallery > media A HomePage has many Story s which should be sortable etc. Theres also HomePageStory to manage the relation, as suggested here: https://github.com/sonata-project/SonataAdminBundle/issues/1231 HomePage.orm.yml oneToMany: HomePageStorys: targetEntity: HomePageStory mappedBy: HomePage cascade: ["persist", "merge", "remove"] HomePageAdmin.php -

Sonata Admin: Boolean selectbox for boolean properties

余生长醉 提交于 2019-12-13 02:24:10
问题 I have defined a boolean property in my Entity: /** * @var boolean * @Assert\Type(type="bool") * @ORM\Column(name="is_managed", type="boolean", nullable=true, options={"default": true}) */ protected $isManaged = true; When I use it in the sonata admin bundle it just generates an select box with values "1" and "2" - I expected "true" or "false" selection. $datagridMapper ->add('description') ->add('isManaged', 'doctrine_orm_boolean') generates the code: <select id="filter_isManaged_value" name

Dropdown Ajax onchange SonataAdminBundle Symfony2 Issue

守給你的承諾、 提交于 2019-12-12 11:34:04
问题 I am trying to implement onchange dropdown in SonataAdminBundle. My Entity is like class BuilderHomePage { /** * @var integer * * @ORM\Column(name="id", type="integer", nullable=false) * @ORM\Id * @ORM\GeneratedValue(strategy="IDENTITY") */ private $id; /** * @var \Hello\FrontendBundle\Entity\MtContentType * * @ORM\ManyToOne(targetEntity="Hello\FrontendBundle\Entity\MtContentType") * @ORM\JoinColumns({ * @ORM\JoinColumn(name="content_type_id", referencedColumnName="id") * }) */ private

Setup SonataNewsBundle to handle media in posts

微笑、不失礼 提交于 2019-12-12 04:48:07
问题 Installed both SonataMediaBundle, SonataNewsBundle and SonataAdminBundle (and much more but these matter). When posting a news item via the admin I choose to use the markdown configured as bellow. sonata_formatter: formatters: markdown: service: sonata.formatter.text.markdown extensions: - sonata.formatter.twig.control_flow - sonata.formatter.twig.gist - sonata.media.formatter.twig The formatter formats all titles etc. as expected however, media are not formatted. Though, I found some

How to add bundles in the Admin Dashboard Symfony2

时光总嘲笑我的痴心妄想 提交于 2019-12-12 01:29:45
问题 I'm working on Sonata Admin bundles. I've configure the Admin Dashboard and the following components are showing in the "Symfony CMF" group, Here's the snapshot, I've gone through the Symfony CMF sandbox site, http://cmf.liip.ch/en/admin/dashboard In this dashboard there are some other bundles like , Simple Block Container Block etc are appearing. Here's the snapshot, I want to add the Content items as shown in the above pic in my "Symfony CMF" group. How to do it ? Here's my config.yml,

Symfony2 WebProfiler (500): Key “default” does not exist as the array is empty in @Doctrine/Collector/db.html.twig at line 209

爱⌒轻易说出口 提交于 2019-12-11 09:08:36
问题 Symfony2 WebProfiler (500): Key "default" does not exist as the array is empty in @Doctrine/Collector/db.html.twig at line 209 I have installed Sonata e-commerce 2.3 branch (fresh installation) on several machines (php 5.4, php 5.5), everything works fine, but and on each one i have the same error in profiler doctrine DB tab: Symfony2 WebProfiler (500): Key "default" does not exist as the array is empty in @Doctrine/Collector/db.html.twig at line 209 Profiler is working fine only after first

Unknown Entity namespace alias 'PirastruFormBuilderBundle'

随声附和 提交于 2019-12-11 07:31:19
问题 It has been now 2 days that i'm looking for a solution to this error but in vain : Unknown Entity namespace alias 'PirastruFormBuilderBundle' in fact i installed the sonata form builder with sonata page bundle using the composer but i don't know why i'm getting this error. i don't know which part of codes should i copie here so please don't hesitate to ask me for it sonata_form_builder: resource: '@PirastruFormBuilderBundle/Controller/FormBuilderController.php' type: annotation Thanks !! EDIT