parent
2c710512cb
commit
d960d4264b
@ -0,0 +1,21 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
namespace Application\Sonata\AdminBundle; |
||||
|
||||
use Symfony\Component\HttpKernel\Bundle\Bundle; |
||||
|
||||
/** |
||||
* Class ApplicationSonataAdminBundle |
||||
* @package Application\Sonata\AdminBundle |
||||
*/ |
||||
class ApplicationSonataAdminBundle extends Bundle |
||||
{ |
||||
/** |
||||
* {@inheritdoc} |
||||
*/ |
||||
public function getParent() |
||||
{ |
||||
return 'SonataAdminBundle'; |
||||
} |
||||
} |
||||
@ -0,0 +1,21 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
namespace Application\Sonata\NewsBundle; |
||||
|
||||
use Symfony\Component\HttpKernel\Bundle\Bundle; |
||||
|
||||
/** |
||||
* Class ApplicationSonataNewsBundle |
||||
* @package Application\Sonata\NewsBundle |
||||
*/ |
||||
class ApplicationSonataNewsBundle extends Bundle |
||||
{ |
||||
/** |
||||
* {@inheritdoc} |
||||
*/ |
||||
public function getParent() |
||||
{ |
||||
return 'SonataNewsBundle'; |
||||
} |
||||
} |
||||
@ -0,0 +1,41 @@ |
||||
<?php |
||||
/** |
||||
* This file is part of the <name> project. |
||||
* |
||||
* (c) <yourname> <youremail> |
||||
* |
||||
* For the full copyright and license information, please view the LICENSE |
||||
* file that was distributed with this source code. |
||||
*/ |
||||
|
||||
namespace Application\Sonata\NewsBundle\Document; |
||||
|
||||
use Sonata\NewsBundle\Document\BaseComment as BaseComment; |
||||
|
||||
/** |
||||
* This file has been generated by the EasyExtends bundle ( http://sonata-project.org/easy-extends ) |
||||
* |
||||
* References : |
||||
* working with object : http://www.doctrine-project.org/docs/mongodb_odm/1.0/en/reference/working-with-objects.html |
||||
* |
||||
* @author <yourname> <youremail> |
||||
*/ |
||||
class Comment extends BaseComment |
||||
{ |
||||
|
||||
/** |
||||
* @var integer $id |
||||
*/ |
||||
protected $id; |
||||
|
||||
/** |
||||
* Get id |
||||
* |
||||
* @return integer $id |
||||
*/ |
||||
public function getId() |
||||
{ |
||||
return $this->id; |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,41 @@ |
||||
<?php |
||||
/** |
||||
* This file is part of the <name> project. |
||||
* |
||||
* (c) <yourname> <youremail> |
||||
* |
||||
* For the full copyright and license information, please view the LICENSE |
||||
* file that was distributed with this source code. |
||||
*/ |
||||
|
||||
namespace Application\Sonata\NewsBundle\Document; |
||||
|
||||
use Sonata\NewsBundle\Document\BasePost as BasePost; |
||||
|
||||
/** |
||||
* This file has been generated by the EasyExtends bundle ( http://sonata-project.org/easy-extends ) |
||||
* |
||||
* References : |
||||
* working with object : http://www.doctrine-project.org/docs/mongodb_odm/1.0/en/reference/working-with-objects.html |
||||
* |
||||
* @author <yourname> <youremail> |
||||
*/ |
||||
class Post extends BasePost |
||||
{ |
||||
|
||||
/** |
||||
* @var integer $id |
||||
*/ |
||||
protected $id; |
||||
|
||||
/** |
||||
* Get id |
||||
* |
||||
* @return integer $id |
||||
*/ |
||||
public function getId() |
||||
{ |
||||
return $this->id; |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,26 @@ |
||||
<?php |
||||
/** |
||||
* This file is part of the <name> project. |
||||
* |
||||
* (c) <yourname> <youremail> |
||||
* |
||||
* For the full copyright and license information, please view the LICENSE |
||||
* file that was distributed with this source code. |
||||
*/ |
||||
|
||||
namespace Application\Sonata\NewsBundle\Document; |
||||
|
||||
use Sonata\NewsBundle\Document\BasePostRepository; |
||||
|
||||
/** |
||||
* This file has been generated by the EasyExtends bundle ( http://sonata-project.org/easy-extends ) |
||||
* |
||||
* References : |
||||
* query builder : http://www.doctrine-project.org/docs/mongodb_odm/1.0/en/reference/query-builder-api.html |
||||
* |
||||
* @author <yourname> <youremail> |
||||
*/ |
||||
class PostRepository extends BasePostRepository |
||||
{ |
||||
|
||||
} |
||||
@ -0,0 +1,40 @@ |
||||
<?php |
||||
/** |
||||
* This file is part of the <name> project. |
||||
* |
||||
* (c) <yourname> <youremail> |
||||
* |
||||
* For the full copyright and license information, please view the LICENSE |
||||
* file that was distributed with this source code. |
||||
*/ |
||||
|
||||
namespace Application\Sonata\NewsBundle\Entity; |
||||
|
||||
use Sonata\NewsBundle\Entity\BaseComment as BaseComment; |
||||
|
||||
/** |
||||
* This file has been generated by the Sonata EasyExtends bundle ( http://sonata-project.org/easy-extends ) |
||||
* |
||||
* References : |
||||
* working with object : http://www.doctrine-project.org/projects/orm/2.0/docs/reference/working-with-objects/en |
||||
* |
||||
* @author <yourname> <youremail> |
||||
*/ |
||||
class Comment extends BaseComment |
||||
{ |
||||
|
||||
/** |
||||
* @var integer $id |
||||
*/ |
||||
protected $id; |
||||
|
||||
/** |
||||
* Get id |
||||
* |
||||
* @return integer $id |
||||
*/ |
||||
public function getId() |
||||
{ |
||||
return $this->id; |
||||
} |
||||
} |
||||
@ -0,0 +1,40 @@ |
||||
<?php |
||||
/** |
||||
* This file is part of the <name> project. |
||||
* |
||||
* (c) <yourname> <youremail> |
||||
* |
||||
* For the full copyright and license information, please view the LICENSE |
||||
* file that was distributed with this source code. |
||||
*/ |
||||
|
||||
namespace Application\Sonata\NewsBundle\Entity; |
||||
|
||||
use Sonata\NewsBundle\Entity\BasePost as BasePost; |
||||
|
||||
/** |
||||
* This file has been generated by the Sonata EasyExtends bundle ( http://sonata-project.org/easy-extends ) |
||||
* |
||||
* References : |
||||
* working with object : http://www.doctrine-project.org/projects/orm/2.0/docs/reference/working-with-objects/en |
||||
* |
||||
* @author <yourname> <youremail> |
||||
*/ |
||||
class Post extends BasePost |
||||
{ |
||||
|
||||
/** |
||||
* @var integer $id |
||||
*/ |
||||
protected $id; |
||||
|
||||
/** |
||||
* Get id |
||||
* |
||||
* @return integer $id |
||||
*/ |
||||
public function getId() |
||||
{ |
||||
return $this->id; |
||||
} |
||||
} |
||||
@ -0,0 +1,28 @@ |
||||
<?php |
||||
/** |
||||
* This file is part of the <name> project. |
||||
* |
||||
* (c) <yourname> <youremail> |
||||
* |
||||
* For the full copyright and license information, please view the LICENSE |
||||
* file that was distributed with this source code. |
||||
*/ |
||||
|
||||
namespace Application\Sonata\NewsBundle\Entity; |
||||
|
||||
use Sonata\NewsBundle\Entity\BasePostRepository; |
||||
|
||||
/** |
||||
* This file has been generated by the EasyExtends bundle ( http://sonata-project.org/easy-extends ) |
||||
* |
||||
* References : |
||||
* custom repository : http://www.doctrine-project.org/projects/orm/2.0/docs/reference/working-with-objects/en#querying:custom-repositories |
||||
* query builder : http://www.doctrine-project.org/projects/orm/2.0/docs/reference/query-builder/en |
||||
* dql : http://www.doctrine-project.org/projects/orm/2.0/docs/reference/dql-doctrine-query-language/en |
||||
* |
||||
* @author <yourname> <youremail> |
||||
*/ |
||||
class PostRepository extends BasePostRepository |
||||
{ |
||||
|
||||
} |
||||
@ -0,0 +1,21 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xsi="http://www.w3.org/2001/XMLSchema-instance" schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd"> |
||||
<!-- |
||||
This file has been generated by the EasyExtends bundle ( http://sonata-project.org/easy-extends ) |
||||
|
||||
References : |
||||
xsd : https://github.com/doctrine/doctrine2/blob/master/doctrine-mapping.xsd |
||||
xml mapping : http://www.doctrine-project.org/projects/orm/2.0/docs/reference/xml-mapping/en |
||||
association mapping : http://www.doctrine-project.org/projects/orm/2.0/docs/reference/association-mapping/en |
||||
--> |
||||
<entity |
||||
name="Application\Sonata\NewsBundle\Entity\Comment" |
||||
table="news__comment" |
||||
repository-class="Doctrine\ORM\EntityRepository"> |
||||
|
||||
<id name="id" type="integer" column="id"> |
||||
<generator strategy="AUTO"/> |
||||
</id> |
||||
|
||||
</entity> |
||||
</doctrine-mapping> |
||||
@ -0,0 +1,21 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xsi="http://www.w3.org/2001/XMLSchema-instance" schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd"> |
||||
<!-- |
||||
This file has been generated by the EasyExtends bundle ( http://sonata-project.org/easy-extends ) |
||||
|
||||
References : |
||||
xsd : https://github.com/doctrine/doctrine2/blob/master/doctrine-mapping.xsd |
||||
xml mapping : http://www.doctrine-project.org/projects/orm/2.0/docs/reference/xml-mapping/en |
||||
association mapping : http://www.doctrine-project.org/projects/orm/2.0/docs/reference/association-mapping/en |
||||
--> |
||||
<entity |
||||
name="Application\Sonata\NewsBundle\Entity\Post" |
||||
table="news__post" |
||||
repository-class="Application\Sonata\NewsBundle\Entity\PostRepository"> |
||||
|
||||
<id name="id" type="integer" column="id"> |
||||
<generator strategy="AUTO"/> |
||||
</id> |
||||
|
||||
</entity> |
||||
</doctrine-mapping> |
||||
@ -0,0 +1,8 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<serializer> |
||||
<class name="Application\Sonata\NewsBundle\Entity\Comment" exclusion-policy="all" xml-root-name="comment"> |
||||
|
||||
<property xml-attribute-map="true" name="id" type="integer" expose="true" since-version="1.0" groups="sonata_api_read,sonata_api_write,sonata_search" /> |
||||
|
||||
</class> |
||||
</serializer> |
||||
@ -0,0 +1,8 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<serializer> |
||||
<class name="Application\Sonata\NewsBundle\Entity\Post" exclusion-policy="all" xml-root-name="post"> |
||||
|
||||
<property xml-attribute-map="true" name="id" type="integer" expose="true" since-version="1.0" groups="sonata_api_read,sonata_api_write,sonata_search" /> |
||||
|
||||
</class> |
||||
</serializer> |
||||
@ -0,0 +1,21 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xsi="http://www.w3.org/2001/XMLSchema-instance" schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd"> |
||||
<!-- |
||||
This file has been generated by the EasyExtends bundle ( http://sonata-project.org/easy-extends ) |
||||
|
||||
References : |
||||
xsd : https://github.com/doctrine/doctrine2/blob/master/doctrine-mapping.xsd |
||||
xml mapping : http://www.doctrine-project.org/projects/orm/2.0/docs/reference/xml-mapping/en |
||||
association mapping : http://www.doctrine-project.org/projects/orm/2.0/docs/reference/association-mapping/en |
||||
--> |
||||
<entity |
||||
name="Application\Sonata\PageBundle\Entity\Block" |
||||
table="page__bloc" |
||||
repository-class="Doctrine\ORM\EntityRepository"> |
||||
|
||||
<id name="id" type="integer" column="id"> |
||||
<generator strategy="AUTO"/> |
||||
</id> |
||||
|
||||
</entity> |
||||
</doctrine-mapping> |
||||
@ -0,0 +1,21 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xsi="http://www.w3.org/2001/XMLSchema-instance" schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd"> |
||||
<!-- |
||||
This file has been generated by the EasyExtends bundle ( http://sonata-project.org/easy-extends ) |
||||
|
||||
References : |
||||
xsd : https://github.com/doctrine/doctrine2/blob/master/doctrine-mapping.xsd |
||||
xml mapping : http://www.doctrine-project.org/projects/orm/2.0/docs/reference/xml-mapping/en |
||||
association mapping : http://www.doctrine-project.org/projects/orm/2.0/docs/reference/association-mapping/en |
||||
--> |
||||
<entity |
||||
name="Application\Sonata\PageBundle\Entity\Page" |
||||
table="page__page" |
||||
> |
||||
|
||||
<id name="id" type="integer" column="id"> |
||||
<generator strategy="AUTO"/> |
||||
</id> |
||||
|
||||
</entity> |
||||
</doctrine-mapping> |
||||
@ -0,0 +1,21 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xsi="http://www.w3.org/2001/XMLSchema-instance" schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd"> |
||||
<!-- |
||||
This file has been generated by the EasyExtends bundle ( http://sonata-project.org/easy-extends ) |
||||
|
||||
References : |
||||
xsd : https://github.com/doctrine/doctrine2/blob/master/doctrine-mapping.xsd |
||||
xml mapping : http://www.doctrine-project.org/projects/orm/2.0/docs/reference/xml-mapping/en |
||||
association mapping : http://www.doctrine-project.org/projects/orm/2.0/docs/reference/association-mapping/en |
||||
--> |
||||
<entity |
||||
name="Application\Sonata\PageBundle\Entity\Site" |
||||
table="page__site" |
||||
> |
||||
|
||||
<id name="id" type="integer" column="id"> |
||||
<generator strategy="AUTO"/> |
||||
</id> |
||||
|
||||
</entity> |
||||
</doctrine-mapping> |
||||
@ -0,0 +1,21 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xsi="http://www.w3.org/2001/XMLSchema-instance" schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd"> |
||||
<!-- |
||||
This file has been generated by the EasyExtends bundle ( http://sonata-project.org/easy-extends ) |
||||
|
||||
References : |
||||
xsd : https://github.com/doctrine/doctrine2/blob/master/doctrine-mapping.xsd |
||||
xml mapping : http://www.doctrine-project.org/projects/orm/2.0/docs/reference/xml-mapping/en |
||||
association mapping : http://www.doctrine-project.org/projects/orm/2.0/docs/reference/association-mapping/en |
||||
--> |
||||
<entity |
||||
name="Application\Sonata\PageBundle\Entity\Snapshot" |
||||
table="page__snapshot" |
||||
> |
||||
|
||||
<id name="id" type="integer" column="id"> |
||||
<generator strategy="AUTO"/> |
||||
</id> |
||||
|
||||
</entity> |
||||
</doctrine-mapping> |
||||
@ -0,0 +1,8 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<serializer> |
||||
<class name="Application\Sonata\PageBundle\Entity\Block" exclusion-policy="all" xml-root-name="block"> |
||||
|
||||
<property xml-attribute-map="true" name="id" type="integer" expose="true" since-version="1.0" groups="sonata_api_read,sonata_api_write,sonata_search" /> |
||||
|
||||
</class> |
||||
</serializer> |
||||
@ -0,0 +1,8 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<serializer> |
||||
<class name="Application\Sonata\PageBundle\Entity\Page" exclusion-policy="all" xml-root-name="page"> |
||||
|
||||
<property xml-attribute-map="true" name="id" type="integer" expose="true" since-version="1.0" groups="sonata_api_read,sonata_api_write,sonata_search" /> |
||||
|
||||
</class> |
||||
</serializer> |
||||
@ -0,0 +1,8 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<serializer> |
||||
<class name="Application\Sonata\PageBundle\Entity\Site" exclusion-policy="all" xml-root-name="site"> |
||||
|
||||
<property xml-attribute-map="true" name="id" type="integer" expose="true" since-version="1.0" groups="sonata_api_read,sonata_api_write,sonata_search" /> |
||||
|
||||
</class> |
||||
</serializer> |
||||
@ -0,0 +1,8 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<serializer> |
||||
<class name="Application\Sonata\PageBundle\Entity\Snapshot" exclusion-policy="all" xml-root-name="snapshot"> |
||||
|
||||
<property xml-attribute-map="true" name="id" type="integer" expose="true" since-version="1.0" groups="sonata_api_read,sonata_api_write,sonata_search" /> |
||||
|
||||
</class> |
||||
</serializer> |
||||
@ -0,0 +1,24 @@ |
||||
{% extends 'SonataPageBundle::2columns_layout.html.twig' %} |
||||
|
||||
{% block sonata_page_body_tag %} |
||||
{{ parent() }} |
||||
|
||||
{% include "SonataSeoBundle:Block:_facebook_sdk.html.twig" %} |
||||
{% include "SonataSeoBundle:Block:_twitter_sdk.html.twig" %} |
||||
{% include "SonataSeoBundle:Block:_pinterest_sdk.html.twig" %} |
||||
|
||||
{% endblock %} |
||||
|
||||
{% block sonata_page_javascripts %} |
||||
<script type="text/javascript"> |
||||
var basket_update_confirmation_message = '{{ 'sonata_basket_update_confirmation'|trans({}, 'SonataDemoBundle')|escape('js') }}'; |
||||
</script> |
||||
|
||||
<script src="{{ asset('assetic/sonata_front_js.js') }}" type="text/javascript"></script> |
||||
{% endblock %} |
||||
|
||||
{% block sonata_page_container %} |
||||
{{ parent() }} |
||||
{% endblock %} |
||||
|
||||
{% block sonata_page_breadcrumb %}{% endblock %} |
||||
@ -0,0 +1,24 @@ |
||||
{% extends 'SonataPageBundle::layout.html.twig' %} |
||||
|
||||
{% block sonata_page_body_tag %} |
||||
{{ parent() }} |
||||
|
||||
{% include "SonataSeoBundle:Block:_facebook_sdk.html.twig" %} |
||||
{% include "SonataSeoBundle:Block:_twitter_sdk.html.twig" %} |
||||
{% include "SonataSeoBundle:Block:_pinterest_sdk.html.twig" %} |
||||
|
||||
{% endblock %} |
||||
|
||||
{% block sonata_page_javascripts %} |
||||
<script type="text/javascript"> |
||||
var basket_update_confirmation_message = '{{ 'sonata_basket_update_confirmation'|trans({}, 'SonataDemoBundle')|escape('js') }}'; |
||||
</script> |
||||
|
||||
<script src="{{ asset('assetic/sonata_front_js.js') }}" type="text/javascript"></script> |
||||
{% endblock %} |
||||
|
||||
{% block sonata_page_container %} |
||||
{{ parent() }} |
||||
{% endblock %} |
||||
|
||||
{% block sonata_page_breadcrumb %}{% endblock %} |
||||
@ -0,0 +1,32 @@ |
||||
<?php |
||||
/** |
||||
* This file is part of the <name> project. |
||||
* |
||||
* (c) <yourname> <youremail> |
||||
* |
||||
* For the full copyright and license information, please view the LICENSE |
||||
* file that was distributed with this source code. |
||||
*/ |
||||
|
||||
namespace Application\Sonata\SeoBundle; |
||||
|
||||
use Symfony\Component\HttpKernel\Bundle\Bundle; |
||||
|
||||
/** |
||||
* This file has been generated by the EasyExtends bundle ( http://sonata-project.org/easy-extends ) |
||||
* |
||||
* References : |
||||
* bundles : http://symfony.com/doc/current/book/bundles.html |
||||
* |
||||
* @author <yourname> <youremail> |
||||
*/ |
||||
class ApplicationSonataSeoBundle extends Bundle |
||||
{ |
||||
/** |
||||
* {@inheritdoc} |
||||
*/ |
||||
public function getParent() |
||||
{ |
||||
return 'SonataSeoBundle'; |
||||
} |
||||
} |
||||
@ -0,0 +1,21 @@ |
||||
{# |
||||
|
||||
This file is part of the Sonata package. |
||||
|
||||
(c) Thomas Rabaix <thomas.rabaix@sonata-project.org> |
||||
|
||||
For the full copyright and license information, please view the LICENSE |
||||
file that was distributed with this source code. |
||||
|
||||
#} |
||||
|
||||
{% extends 'knp_menu_ordered.html.twig' %} |
||||
{% block label %}{{ item.label|trans(item.getExtra('translation_params', {}), item.getExtra('translation_domain', 'SonataSeoBundle')) }}{% endblock %} |
||||
|
||||
{% block list %} |
||||
{% spaceless %} |
||||
<div class="sonata_breadcrumb"> |
||||
{{ parent() }} |
||||
</div> |
||||
{% endspaceless %} |
||||
{% endblock %} |
||||
@ -0,0 +1,29 @@ |
||||
<?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/constraint-mapping/constraint-mapping-1.0.xsd"> |
||||
|
||||
<class name="FOS\UserBundle\Model\User"> |
||||
<constraint name="Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity"> |
||||
<option name="fields">usernameCanonical</option> |
||||
<option name="errorPath">username</option> |
||||
<option name="message">fos_user.username.already_used</option> |
||||
<option name="groups"> |
||||
<value>ProfileCustom</value> |
||||
</option> |
||||
</constraint> |
||||
</class> |
||||
|
||||
<class name="Application\Sonata\UserBundle\Entity\User"> |
||||
<constraint name="Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity"> |
||||
<option name="fields">usernameCanonical</option> |
||||
<option name="errorPath">username</option> |
||||
<option name="message">fos_user.username.already_used</option> |
||||
<option name="groups"> |
||||
<value>ProfileCustom</value> |
||||
</option> |
||||
</constraint> |
||||
</class> |
||||
|
||||
</constraint-mapping> |
||||
@ -0,0 +1,18 @@ |
||||
<?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/constraint-mapping/constraint-mapping-1.0.xsd"> |
||||
|
||||
<class name="Application\Sonata\UserBundle\Entity\User"> |
||||
<constraint name="Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity"> |
||||
<option name="fields">usernameCanonical</option> |
||||
<option name="errorPath">username</option> |
||||
<option name="message">fos_user.username.already_used</option> |
||||
<option name="groups"> |
||||
<value>ProfileCustom</value> |
||||
</option> |
||||
</constraint> |
||||
</class> |
||||
|
||||
</constraint-mapping> |
||||
@ -0,0 +1,90 @@ |
||||
{# |
||||
|
||||
This file is part of the Sonata package. |
||||
|
||||
(c) Thomas Rabaix <thomas.rabaix@sonata-project.org> |
||||
|
||||
For the full copyright and license information, please view the LICENSE |
||||
file that was distributed with this source code. |
||||
|
||||
#} |
||||
|
||||
{% extends "SonataUserBundle::layout.html.twig" %} |
||||
|
||||
{% block fos_user_content %} |
||||
<div class="row"> |
||||
<div class="col-sm-6"> |
||||
{% block sonata_user_login %} |
||||
<div class="panel panel-info"> |
||||
|
||||
<div class="panel-heading"> |
||||
<h2 class="panel-title">{{ 'title_user_authentication'|trans({}, 'SonataUserBundle') }}</h2> |
||||
</div> |
||||
|
||||
<div class="panel-body"> |
||||
|
||||
{% block sonata_user_login_error %} |
||||
{% if error %} |
||||
<div class="alert alert-danger alert-danger">{{ error|trans({}, 'FOSUserBundle') }}</div> |
||||
{% endif %} |
||||
{% endblock %} |
||||
|
||||
{% block sonata_user_login_form %} |
||||
<form action="{{ path("fos_user_security_check") }}" method="post" role="form" |
||||
class="form-horizontal"> |
||||
<input type="hidden" name="_csrf_token" value="{{ csrf_token }}"/> |
||||
|
||||
<div class="form-group"> |
||||
<label for="username" |
||||
class="col-sm-4 control-label">{{ 'security.login.username'|trans({}, 'SonataUserBundle') }}</label> |
||||
|
||||
<div class="col-sm-8"><input type="text" class="form-control" id="username" |
||||
name="_username" value="{{ last_username }}" |
||||
required="required"/></div> |
||||
</div> |
||||
|
||||
|
||||
<div class="form-group control-group"> |
||||
<label for="password" |
||||
class="col-sm-4 control-label">{{ 'security.login.password'|trans({}, 'SonataUserBundle') }}</label> |
||||
|
||||
<div class="col-sm-8"><input type="password" class="form-control" id="password" |
||||
name="_password" required="required"/></div> |
||||
</div> |
||||
|
||||
<div class="form-group"> |
||||
<div class="col-sm-offset-4 col-sm-8"> |
||||
<div class="checkbox control-group"> |
||||
<label for="remember_me"> |
||||
<input type="checkbox" id="remember_me" name="_remember_me" value="on"/> |
||||
{{ 'security.login.remember_me'|trans({}, 'FOSUserBundle') }} |
||||
</label> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<div class="form-group control-group"> |
||||
<div class="controls col-sm-offset-4 col-sm-8"> |
||||
<a href="{{ path('fos_user_resetting_request') }}">{{ 'forgotten_password'|trans({}, 'SonataUserBundle') }}</a> |
||||
</div> |
||||
</div> |
||||
|
||||
<div class="form-group"> |
||||
<div class="col-sm-offset-4 col-sm-8"> |
||||
<input type="submit" id="_submit" name="_submit" class="btn btn-primary" |
||||
value="{{ 'security.login.submit'|trans({}, 'FOSUserBundle') }}"/> |
||||
</div> |
||||
</div> |
||||
</form> |
||||
{% endblock %} |
||||
</div> |
||||
</div> |
||||
{% endblock %} |
||||
</div> |
||||
<div class="col-sm-6"> |
||||
{% block sonata_user_registration %} |
||||
{% render controller("SonataUserBundle:RegistrationFOSUser1:register") %} |
||||
{% endblock %} |
||||
</div> |
||||
</div> |
||||
{% endblock fos_user_content %} |
||||
@ -0,0 +1 @@ |
||||
{% extends "SonataUserBundle:Security:base_login.html.twig" %} |
||||
@ -0,0 +1,4 @@ |
||||
<div> |
||||
{% block fos_user_content %} |
||||
{% endblock fos_user_content %} |
||||
</div> |
||||
@ -0,0 +1,24 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
namespace Application\Sonata\UserBundle\Security; |
||||
|
||||
use Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface; |
||||
|
||||
/** |
||||
* Class Encoder |
||||
* @package Application\Sonata\UserBundle\Security |
||||
*/ |
||||
class Encoder implements PasswordEncoderInterface |
||||
{ |
||||
public function encodePassword($raw, $salt) |
||||
{ |
||||
// Do not use salt here. |
||||
return sha1($raw); |
||||
} |
||||
|
||||
public function isPasswordValid($encoded, $raw, $salt) |
||||
{ |
||||
return $encoded === $this->encodePassword($raw, $salt); |
||||
} |
||||
} |
||||
@ -0,0 +1,28 @@ |
||||
<?php |
||||
|
||||
namespace ChamiloLMS\CoreBundle\Entity; |
||||
|
||||
use Doctrine\ORM\Mapping as ORM; |
||||
use FOS\CommentBundle\Entity\Comment as BaseComment; |
||||
|
||||
/** |
||||
* @ORM\Entity |
||||
* @ORM\ChangeTrackingPolicy("DEFERRED_EXPLICIT") |
||||
*/ |
||||
class Comment extends BaseComment |
||||
{ |
||||
/** |
||||
* @ORM\Id |
||||
* @ORM\Column(type="integer") |
||||
* @ORM\GeneratedValue(strategy="AUTO") |
||||
*/ |
||||
protected $id; |
||||
|
||||
/** |
||||
* Thread of this comment |
||||
* |
||||
* @var Thread |
||||
* @ORM\ManyToOne(targetEntity="ChamiloLMS\CoreBundle\Entity\Thread") |
||||
*/ |
||||
protected $thread; |
||||
} |
||||
@ -0,0 +1,68 @@ |
||||
<?php |
||||
|
||||
namespace ChamiloLMS\CoreBundle\Entity; |
||||
|
||||
use Doctrine\ORM\Mapping as ORM; |
||||
use Doctrine\Common\Collections\ArrayCollection; |
||||
use FOS\MessageBundle\Entity\Message as BaseMessage; |
||||
use Avanzu\AdminThemeBundle\Model\MessageInterface as ThemeMessage; |
||||
|
||||
/** |
||||
* @ORM\Entity |
||||
*/ |
||||
class Message extends BaseMessage implements ThemeMessage |
||||
{ |
||||
/** |
||||
* @ORM\Id |
||||
* @ORM\Column(type="integer") |
||||
* @ORM\GeneratedValue(strategy="AUTO") |
||||
*/ |
||||
protected $id; |
||||
|
||||
/** |
||||
* @ORM\ManyToOne( |
||||
* targetEntity="ChamiloLMS\CoreBundle\Entity\Thread", |
||||
* inversedBy="messages" |
||||
* ) |
||||
* @var ThreadInterface |
||||
*/ |
||||
protected $thread; |
||||
|
||||
/** |
||||
* @ORM\ManyToOne(targetEntity="Application\Sonata\UserBundle\Entity\User") |
||||
* @var ParticipantInterface |
||||
*/ |
||||
protected $sender; |
||||
|
||||
/** |
||||
* @ORM\OneToMany( |
||||
* targetEntity="ChamiloLMS\CoreBundle\Entity\MessageMetadata", |
||||
* mappedBy="message", |
||||
* cascade={"all"} |
||||
* ) |
||||
* @var MessageMetadata |
||||
*/ |
||||
protected $metadata; |
||||
|
||||
// |
||||
public function getFrom() |
||||
{ |
||||
return $this->getSender(); |
||||
} |
||||
|
||||
public function getSentAt() |
||||
{ |
||||
return $this->getTimestamp(); |
||||
} |
||||
|
||||
public function getSubject() |
||||
{ |
||||
return $this->getThread()->getSubject(); |
||||
} |
||||
|
||||
public function getIdentifier() |
||||
{ |
||||
return $this->getId(); |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,36 @@ |
||||
<?php |
||||
|
||||
namespace ChamiloLMS\CoreBundle\Entity; |
||||
|
||||
use Doctrine\ORM\Mapping as ORM; |
||||
use FOS\MessageBundle\Entity\MessageMetadata as BaseMessageMetadata; |
||||
use FOS\MessageBundle\Model\MessageInterface; |
||||
use FOS\MessageBundle\Model\ParticipantInterface; |
||||
|
||||
/** |
||||
* @ORM\Entity |
||||
*/ |
||||
class MessageMetadata extends BaseMessageMetadata |
||||
{ |
||||
/** |
||||
* @ORM\Id |
||||
* @ORM\Column(type="integer") |
||||
* @ORM\GeneratedValue(strategy="AUTO") |
||||
*/ |
||||
protected $id; |
||||
|
||||
/** |
||||
* @ORM\ManyToOne( |
||||
* targetEntity="ChamiloLMS\CoreBundle\Entity\Message", |
||||
* inversedBy="metadata" |
||||
* ) |
||||
* @var MessageInterface |
||||
*/ |
||||
protected $message; |
||||
|
||||
/** |
||||
* @ORM\ManyToOne(targetEntity="Application\Sonata\UserBundle\Entity\User") |
||||
* @var ParticipantInterface |
||||
*/ |
||||
protected $participant; |
||||
} |
||||
@ -0,0 +1,44 @@ |
||||
<?php |
||||
|
||||
namespace ChamiloLMS\CoreBundle\Entity; |
||||
|
||||
use Doctrine\ORM\Mapping as ORM; |
||||
use FOS\MessageBundle\Entity\Thread as BaseThread; |
||||
|
||||
/** |
||||
* @ORM\Entity |
||||
* @ORM\ChangeTrackingPolicy("DEFERRED_EXPLICIT") |
||||
*/ |
||||
class Thread extends BaseThread |
||||
{ |
||||
/** |
||||
* @ORM\Id |
||||
* @ORM\Column(type="integer") |
||||
* @ORM\GeneratedValue(strategy="AUTO") |
||||
*/ |
||||
protected $id; |
||||
|
||||
/** |
||||
* @ORM\ManyToOne(targetEntity="Application\Sonata\UserBundle\Entity\User") |
||||
*/ |
||||
protected $createdBy; |
||||
|
||||
/** |
||||
* @ORM\OneToMany( |
||||
* targetEntity="ChamiloLMS\CoreBundle\Entity\Message", |
||||
* mappedBy="thread" |
||||
* ) |
||||
* @var Message[]|\Doctrine\Common\Collections\Collection |
||||
*/ |
||||
protected $messages; |
||||
|
||||
/** |
||||
* @ORM\OneToMany( |
||||
* targetEntity="ChamiloLMS\CoreBundle\Entity\ThreadMetadata", |
||||
* mappedBy="thread", |
||||
* cascade={"all"} |
||||
* ) |
||||
* @var ThreadMetadata[]|\Doctrine\Common\Collections\Collection |
||||
*/ |
||||
protected $metadata; |
||||
} |
||||
@ -0,0 +1,34 @@ |
||||
<?php |
||||
|
||||
namespace ChamiloLMS\CoreBundle\Entity; |
||||
|
||||
use Doctrine\ORM\Mapping as ORM; |
||||
use FOS\MessageBundle\Entity\ThreadMetadata as BaseThreadMetadata; |
||||
|
||||
/** |
||||
* @ORM\Entity |
||||
*/ |
||||
class ThreadMetadata extends BaseThreadMetadata |
||||
{ |
||||
/** |
||||
* @ORM\Id |
||||
* @ORM\Column(type="integer") |
||||
* @ORM\GeneratedValue(strategy="AUTO") |
||||
*/ |
||||
protected $id; |
||||
|
||||
/** |
||||
* @ORM\ManyToOne( |
||||
* targetEntity="ChamiloLMS\CoreBundle\Entity\Thread", |
||||
* inversedBy="metadata" |
||||
* ) |
||||
* @var ThreadInterface |
||||
*/ |
||||
protected $thread; |
||||
|
||||
/** |
||||
* @ORM\ManyToOne(targetEntity="Application\Sonata\UserBundle\Entity\User") |
||||
* @var ParticipantInterface |
||||
*/ |
||||
protected $participant; |
||||
} |
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue