Hello, i am from Argentina, i read the book write by Jon Torrado and i like the lin3s way.. :-). ok, i have an error on /profiel route using SymfonyStandard:
An exception has been thrown during the rendering of a template ("The block type "sonata.user.block.menu" does not exist") in SonataUserBundle:Profile:action.html.twig at line 27.
composer.json
{
"name": "lin3s/symfony-standard",
"description": "The \"Symfony Standard Edition\" distribution in the LIN3S way",
"keywords": ["lin3s", "symfony", "standard"],
"type": "project",
"license": "MIT",
"authors": [
{
"name": "LIN3S",
"email": "info@lin3s.com",
"homepage": "https://lin3s.com"
}
],
"require": {
"php": ">=5.4",
# 1. add the path in parameters.yml
# e.g. database_path: "%kernel.root_dir%/data/data.db3"
# 2. Uncomment database_path in parameters.yml.dist
# 3. Uncomment next line:
# path: "%database_path%"
fos_user:
db_driver: orm # other valid values are 'mongodb', 'couchdb' and 'propel'
firewall_name: main
user_class: Application\Sonata\UserBundle\Entity\User
group:
group_class: Application\Sonata\UserBundle\Entity\Group
group_manager: sonata.user.orm.group_manager
service:
user_manager: sonata.user.orm.user_manager
sonata_user:
manager_type: orm # can be orm or mongodb
admin:
user:
class: Application\Sonata\UserBundle\Admin\UserAdmin
sonata_block:
default_contexts: [cms]
blocks:
sonata.admin.block.admin_list:
contexts: [admin]
sonata.user.block.menu: # used to display the menu in profile pages
sonata.user.block.account: # used to display menu option (login option)
sonata.block.service.text: # used to if you plan to use Sonata user routes
AppKernel.php
<?php
/*
This file is part of the Symfony Standard project.
*
Copyright (c) 2015 LIN3S info@lin3s.com
*
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
*/
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;
{@inheritdoc}
*/
public function registerBundles()
{
$bundles = [
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
new Symfony\Bundle\TwigBundle\TwigBundle(),
new Symfony\Bundle\MonologBundle\MonologBundle(),
new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(),
new FOS\UserBundle\FOSUserBundle(),
new Liip\ImagineBundle\LiipImagineBundle(),
new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
new Sonata\CoreBundle\SonataCoreBundle(),
new Sonata\BlockBundle\SonataBlockBundle(),
new Knp\Bundle\MenuBundle\KnpMenuBundle(),
new Sonata\DoctrineORMAdminBundle\SonataDoctrineORMAdminBundle(),
new Sonata\AdminBundle\SonataAdminBundle(),
new Sonata\EasyExtendsBundle\SonataEasyExtendsBundle(),
new Sonata\UserBundle\SonataUserBundle('FOSUserBundle'),
new Application\Sonata\UserBundle\ApplicationSonataUserBundle(),
new AppBundle\AppBundle(),
];
if (in_array($this->getEnvironment(), ['dev', 'test'])) {
$bundles[] = new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle();
$bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
}
return $bundles;
}
/**
{@inheritdoc}
*/
public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load($this->getRootDir() . '/config/config_' . $this->getEnvironment() . '.yml');
}
//para acelerar vagrant se pasa la cache y el log al sistema de archivos de la máquina virtual
public function getCacheDir()
{
if (in_array($this->environment, array('dev', 'test'))) {
return '/dev/shm/stecnico/cache/' . $this->environment;
}
return parent::getCacheDir();
}
public function getLogDir()
{
if (in_array($this->environment, array('dev', 'test'))) {
return '/dev/shm/stecnico/logs';
}
Hello, i am from Argentina, i read the book write by Jon Torrado and i like the lin3s way.. :-). ok, i have an error on /profiel route using SymfonyStandard:
An exception has been thrown during the rendering of a template ("The block type "sonata.user.block.menu" does not exist") in SonataUserBundle:Profile:action.html.twig at line 27.
composer.json { "name": "lin3s/symfony-standard", "description": "The \"Symfony Standard Edition\" distribution in the LIN3S way", "keywords": ["lin3s", "symfony", "standard"], "type": "project", "license": "MIT", "authors": [ { "name": "LIN3S", "email": "info@lin3s.com", "homepage": "https://lin3s.com" } ], "require": { "php": ">=5.4",
}
config.yml
This file is part of the Symfony Standard project.
Copyright (c) 2015 LIN3S info@lin3s.com
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
@author Jon Torrado jontorrado@gmail.com
@author Beñat Espiña benatespina@gmail.com
imports:
framework:
esi: ~
Twig Configuration
twig: debug: "%kernel.debug%" strict_variables: "%kernel.debug%"
Doctrine Configuration
doctrine: dbal: driver: "%database_driver%" host: "%database_host%" port: "%database_port%" dbname: "%database_name%" user: "%database_user%" password: "%database_password%" charset: UTF8 types: json: Sonata\Doctrine\Types\JsonType
if using pdo_sqlite as your database driver:
Swiftmailer Configuration
swiftmailer: transport: "%mailer_transport%" host: "%mailer_host%" username: "%mailer_user%" password: "%mailer_password%" spool: { type: memory }
Doctrine Migrations Configuration
doctrine_migrations: dir_name: "%kernel.root_dir%/migrations" namespace: "%application_name%\Migrations" table_name: migration_versions name: %application_name% Migrations
LiipImagine Configuration
liip_imagine: resolvers: default: web_path: ~
StofDoctrineExtensions Configuration
stof_doctrine_extensions: default_locale: "%locale%" orm: default: timestampable: true
mongodb:
Sonata Admin & User Configuration
sonata_block: default_contexts: [cms] blocks: sonata.admin.block.admin_list: contexts: [admin]
fos_user: db_driver: orm # other valid values are 'mongodb', 'couchdb' and 'propel' firewall_name: main user_class: Application\Sonata\UserBundle\Entity\User group: group_class: Application\Sonata\UserBundle\Entity\Group group_manager: sonata.user.orm.group_manager service: user_manager: sonata.user.orm.user_manager
sonata_user: manager_type: orm # can be orm or mongodb admin: user: class: Application\Sonata\UserBundle\Admin\UserAdmin
sonata_block: default_contexts: [cms] blocks: sonata.admin.block.admin_list: contexts: [admin] sonata.user.block.menu: # used to display the menu in profile pages sonata.user.block.account: # used to display menu option (login option) sonata.block.service.text: # used to if you plan to use Sonata user routes
AppKernel.php
<?php
/*
use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Config\Loader\LoaderInterface;
/**
@author Beñat Espiña benatespina@gmail.com / class AppKernel extends Kernel { /*
];
if (in_array($this->getEnvironment(), ['dev', 'test'])) { $bundles[] = new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(); $bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle(); $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle(); $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle(); $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle(); }
return $bundles; }
/**
//para acelerar vagrant se pasa la cache y el log al sistema de archivos de la máquina virtual public function getCacheDir() { if (in_array($this->environment, array('dev', 'test'))) { return '/dev/shm/stecnico/cache/' . $this->environment; }
}
public function getLogDir() { if (in_array($this->environment, array('dev', 'test'))) { return '/dev/shm/stecnico/logs'; }
} }
Thanks