Adding admins for basic entities.

1.10.x
Julio Montoya 11 years ago
parent 623e9e0c01
commit 9bf41b93e4
  1. 61
      src/ChamiloLMS/CoreBundle/Admin/AccessUrlAdmin.php
  2. 64
      src/ChamiloLMS/CoreBundle/Admin/AccessUrlRelCourseAdmin.php
  3. 64
      src/ChamiloLMS/CoreBundle/Admin/CourseAdmin.php
  4. 16
      src/ChamiloLMS/CoreBundle/Admin/CourseRelUserAdmin.php
  5. 40
      src/ChamiloLMS/CoreBundle/Admin/SessionAdmin.php
  6. 50
      src/ChamiloLMS/CoreBundle/Admin/SessionRelCourseAdmin.php
  7. 13
      src/ChamiloLMS/CoreBundle/Controller/AccessUrlAdminController.php
  8. 4
      src/ChamiloLMS/CoreBundle/Controller/IndexController.php
  9. 14
      src/ChamiloLMS/CoreBundle/Controller/Tool/CourseHome/CourseHomeController.php
  10. 21
      src/ChamiloLMS/CoreBundle/Entity/AccessUrl.php
  11. 60
      src/ChamiloLMS/CoreBundle/Entity/AccessUrlRelCourse.php
  12. 121
      src/ChamiloLMS/CoreBundle/Entity/Course.php
  13. 11
      src/ChamiloLMS/CoreBundle/Entity/CourseRelUser.php
  14. 71
      src/ChamiloLMS/CoreBundle/Entity/Session.php
  15. 183
      src/ChamiloLMS/CoreBundle/Entity/SessionRelCourse.php
  16. 34
      src/ChamiloLMS/CoreBundle/Resources/config/admin.yml

@ -0,0 +1,61 @@
<?php
namespace ChamiloLMS\CoreBundle\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;
/**
* Class AccessUrlAdmin
* @package ChamiloLMS\CoreBundle\Admin
*/
class AccessUrlAdmin extends Admin
{
/**
* @param FormMapper $formMapper
*/
protected function configureFormFields(FormMapper $formMapper)
{
$formMapper
->add('url', 'url')
//->add('code') //if no type is specified, SonataAdminBundle tries to guess it
->add('description', 'textarea', array('attr' => array('class'=> 'ckeditor')))
->add('active')
->add('url_type', 'text')
;
}
/**
* @param DatagridMapper $datagridMapper
*/
protected function configureDatagridFilters(DatagridMapper $datagridMapper)
{
$datagridMapper
->add('url')
;
}
/**
* @param ListMapper $listMapper
*/
protected function configureListFields(ListMapper $listMapper)
{
$listMapper
->addIdentifier('url')
;
}
/**
* @param $course
* @return mixed|void
*/
public function preUpdate($course)
{
//$course->setUsers($course->getUsers());
}
}

@ -0,0 +1,64 @@
<?php
namespace ChamiloLMS\CoreBundle\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 ChamiloLMS\CoreBundle\Entity\CourseRelUser;
use Knp\Menu\ItemInterface as MenuItemInterface;
/**
* Class CourseAdmin
* @package ChamiloLMS\CoreBundle\Admin
*/
class AccessUrlRelCourseAdmin extends Admin
{
/**
* @param \Sonata\AdminBundle\Show\ShowMapper $showMapper
*
* @return void
*/
protected function configureShowField(ShowMapper $showMapper)
{
$showMapper
->add('id')
;
}
/**
* @param FormMapper $formMapper
*/
protected function configureFormFields(FormMapper $formMapper)
{
$formMapper
->add('url')
->end()
;
}
/**
* @param DatagridMapper $datagridMapper
*/
protected function configureDatagridFilters(DatagridMapper $datagridMapper)
{
$datagridMapper
->add('url')
;
}
/**
* @param ListMapper $listMapper
*/
protected function configureListFields(ListMapper $listMapper)
{
$listMapper
->addIdentifier('url')
;
}
}

@ -16,45 +16,83 @@ use Knp\Menu\ItemInterface as MenuItemInterface;
*/
class CourseAdmin extends Admin
{
// Fields to be shown on create/edit forms
/**
* @param FormMapper $formMapper
*/
protected function configureFormFields(FormMapper $formMapper)
{
$formMapper
->add('id', 'text', array('label' => 'Course'))
//->add('author', 'entity', array('class' => 'Acme\DemoBundle\Entity\User'))
->add('code') //if no type is specified, SonataAdminBundle tries to guess it
->add('title')
->add('code','text',array(
'read_only' => true,
))
//->add('code') //if no type is specified, SonataAdminBundle tries to guess it
->add('description', 'textarea', array('attr' => array('class'=> 'ckeditor')))
->add('departmentName')
->add('departmentUrl')
->add('urls', 'sonata_type_collection', array(
'cascade_validation' => true,
), array(
'allow_delete' => true,
'by_reference' => false,
'edit' => 'inline',
'inline' => 'table',
//'btn_add' => true,
//'multiple' => true
//'sortable' => 'position',
//'link_parameters' => array('content' => $users),
'admin_code' => 'sonata.admin.access_url_rel_course'
)
)
->add('users', 'sonata_type_collection', array(
'cascade_validation' => true,
), array(
'allow_delete' => true,
'by_reference' => false,
'edit' => 'inline',
'inline' => 'table',
//'btn_add' => true,
//'multiple' => true
//'sortable' => 'position',
//'link_parameters' => array('context' => $context),
//'admin_code' => 'sonata.media.admin.gallery_has_media'
//'link_parameters' => array('content' => $users),
'admin_code' => 'sonata.admin.course_rel_user'
)
)
//->add('users', 'entity', array('class' => 'Application\Sonata\UserBundle\Entity\User', 'label' => 'Cliente'))
;
}
// Fields to be shown on filter forms
/**
* @param DatagridMapper $datagridMapper
*/
protected function configureDatagridFilters(DatagridMapper $datagridMapper)
{
$datagridMapper
->add('id')
->add('code')
->add('title')
->add('code')//->add('users')
;
}
// Fields to be shown on lists
/**
* @param ListMapper $listMapper
*/
protected function configureListFields(ListMapper $listMapper)
{
$listMapper
->addIdentifier('id')
->add('code')
->add('title')
->addIdentifier('code')
->addIdentifier('title')
;
}
/**
* Very important in order to save the related entities!
* @param \ChamiloLMS\CoreBundle\Entity\Course $course
* @return mixed|void
*/
public function preUpdate($course)
{
$course->setUsers($course->getUsers());
$course->setUrls($course->getUrls());
}
}

@ -30,15 +30,13 @@ class CourseRelUserAdmin extends Admin
;
}
/**
* @param FormMapper $formMapper
*/
protected function configureFormFields(FormMapper $formMapper)
{
$formMapper
->add('user', 'sonata_type_model', array(),
array(
'admin_code' => 'sonata.user.admin.user'
)
)
->add('course')
->add('user')
->add('group')
->add('status', 'sonata_type_translatable_choice', array(
'choices' => CourseRelUser::getStatusList()
@ -52,6 +50,9 @@ class CourseRelUserAdmin extends Admin
;
}
/**
* @param DatagridMapper $datagridMapper
*/
protected function configureDatagridFilters(DatagridMapper $datagridMapper)
{
$datagridMapper
@ -60,6 +61,9 @@ class CourseRelUserAdmin extends Admin
;
}
/**
* @param ListMapper $listMapper
*/
protected function configureListFields(ListMapper $listMapper)
{
$listMapper

@ -16,7 +16,9 @@ use Knp\Menu\ItemInterface as MenuItemInterface;
*/
class SessionAdmin extends Admin
{
// Fields to be shown on create/edit forms
/**
* @param FormMapper $formMapper
*/
protected function configureFormFields(FormMapper $formMapper)
{
$formMapper
@ -24,6 +26,18 @@ class SessionAdmin extends Admin
->add('name') //if no type is specified, SonataAdminBundle tries to guess it
->add('display_start_date', 'sonata_type_date_picker')
->add('generalCoach')
->add('visibility')
//->add('courses')
->add('courses', 'sonata_type_collection', array(
'cascade_validation' => true,
), array(
'edit' => 'inline',
'inline' => 'table',
//'sortable' => 'position',
//'link_parameters' => array('context' => $context),
'admin_code' => 'sonata.admin.session_rel_course'
)
)
;
/*->add('student', 'sonata_type_model', array(),
@ -32,6 +46,9 @@ class SessionAdmin extends Admin
))*/
}
/**
* @param ShowMapper $showMapper
*/
protected function configureShowField(ShowMapper $showMapper)
{
$showMapper
@ -41,8 +58,9 @@ class SessionAdmin extends Admin
;
}
// Fields to be shown on filter forms
/**
* @param DatagridMapper $datagridMapper
*/
protected function configureDatagridFilters(DatagridMapper $datagridMapper)
{
$datagridMapper
@ -52,13 +70,25 @@ class SessionAdmin extends Admin
;
}
// Fields to be shown on lists
/**
* @param ListMapper $listMapper
*/
protected function configureListFields(ListMapper $listMapper)
{
$listMapper
->addIdentifier('id')
->add('name')
->addIdentifier('name')
//->add('display_start_date', 'sonata_type_date_picker')
;
}
/**
* Very important in order to save the related entities!
* @param \ChamiloLMS\CoreBundle\Entity\Session $session
* @return mixed|void
*/
public function preUpdate($session)
{
$session->setCourses($session->getCourses());
}
}

@ -0,0 +1,50 @@
<?php
namespace ChamiloLMS\CoreBundle\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 ChamiloLMS\CoreBundle\Entity\CourseRelUser;
use Knp\Menu\ItemInterface as MenuItemInterface;
/**
* Class SessionRelCourseAdmin
* @package ChamiloLMS\CoreBundle\Admin
*/
class SessionRelCourseAdmin extends Admin
{
protected function configureShowField(ShowMapper $showMapper)
{
$showMapper
->add('id')
;
}
protected function configureFormFields(FormMapper $formMapper)
{
$formMapper
->add('course')
//->add('session')
->end()
;
}
protected function configureDatagridFilters(DatagridMapper $datagridMapper)
{
$datagridMapper
->add('id')
;
}
protected function configureListFields(ListMapper $listMapper)
{
$listMapper
->addIdentifier('id')
;
}
}

@ -0,0 +1,13 @@
<?php
namespace ChamiloLMS\CoreBundle\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Symfony\Component\HttpFoundation\Response;
use Sonata\AdminBundle\Controller\CRUDController as Controller;
class AccessUrlAdminController extends Controller
{
}

@ -471,10 +471,12 @@ class IndexController extends BaseController
}
$template = $this->getTemplate();
//Show the chamilo mascot
// Show the chamilo mascot
if (empty($items) && empty($filter)) {
$pageController->return_welcome_to_course_block($template);
}
$pageController->returnSkillsLinks();
// Deleting the session_id.

@ -4,6 +4,7 @@
namespace ChamiloLMS\CoreBundle\Controller\Tool\CourseHome;
use ChamiloLMS\CoreBundle\Controller\ToolBaseController;
use ChamiloLMS\CoreBundle\Controller\BaseController;
use Symfony\Component\HttpFoundation\Response;
use ChamiloLMS\CoreBundle\Controller\CrudController;
use Symfony\Component\Routing\Annotation\Route;
@ -21,19 +22,6 @@ use Display;
*/
class CourseHomeController extends ToolBaseController
{
public function getClass()
{
return 'ChamiloLMS\CoreBundle\Entity\CTool';
}
/**
* {@inheritdoc}
*/
public function getType()
{
return 'ChamiloLMS\CoreBundle\Form\CourseHomeToolType';
}
/**
* @Route("/")
* @Route("/home")

@ -63,6 +63,27 @@ class AccessUrl
*/
private $urlType;
/**
* @ORM\OneToMany(targetEntity="AccessUrlRelCourse", mappedBy="url", cascade={"persist"}, orphanRemoval=true)
**/
private $course;
/**
*
*/
public function __construct()
{
$this->tms = new \DateTime();
$this->createdBy = 1;
}
/**
* @return string
*/
public function __toString()
{
return (string) $this->getUrl();
}
/**
* Get id

@ -26,15 +26,34 @@ class AccessUrlRelCourse
*
* @ORM\Column(name="access_url_id", type="integer", precision=0, scale=0, nullable=false, unique=false)
*/
private $accessUrlId;
//private $accessUrlId;
/**
* @var integer
*
* @ORM\Column(name="c_id", type="integer", precision=0, scale=0, nullable=false, unique=false)
*/
private $cId;
//private $cId;
/**
* @ORM\ManyToOne(targetEntity="Course", inversedBy="urls", cascade={"persist"})
* @ORM\JoinColumn(name="c_id", referencedColumnName="id")
*/
protected $course;
/**
* @ORM\ManyToOne(targetEntity="AccessUrl", inversedBy="course", cascade={"persist"})
* @ORM\JoinColumn(name="access_url_id", referencedColumnName="id")
*/
protected $url;
/**
* @return string
*/
public function __toString()
{
return strval('-');
}
/**
* Get id
@ -46,6 +65,27 @@ class AccessUrlRelCourse
return $this->id;
}
/**
* Set accessUrlId
*
* @param $url
* @return AccessUrlRelCourse
*/
public function setUrl($url)
{
$this->url = $url;
return $this;
}
/**
* @return mixed
*/
public function getUrl()
{
return $this->url;
}
/**
* Set accessUrlId
*
@ -69,6 +109,22 @@ class AccessUrlRelCourse
return $this->accessUrlId;
}
/**
* @param $course
*/
public function setCourse($course)
{
$this->course = $course;
}
/**
* @return mixed
*/
public function getCourse()
{
return $this->course;
}
/**
* Set cId
*

@ -4,7 +4,7 @@ namespace ChamiloLMS\CoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Gedmo\Mapping\Annotation as Gedmo;
/**
* Course
@ -26,23 +26,23 @@ class Course
/**
* @var string
*
* @ORM\Column(name="code", type="string", length=40, precision=0, scale=0, nullable=false, unique=false)
* @ORM\Column(name="title", type="string", length=250, precision=0, scale=0, nullable=true, unique=false)
*/
private $code;
private $title;
/**
* @var string
*
* @ORM\Column(name="directory", type="string", length=40, precision=0, scale=0, nullable=true, unique=false)
* @Gedmo\Slug(fields={"title"})
* @ORM\Column(name="code", type="string", length=40, precision=0, scale=0, nullable=false, unique=true)
*/
private $directory;
private $code;
/**
* @var string
*
* @ORM\Column(name="db_name", type="string", length=40, precision=0, scale=0, nullable=true, unique=false)
* @ORM\Column(name="directory", type="string", length=40, precision=0, scale=0, nullable=true, unique=false)
*/
private $dbName;
private $directory;
/**
* @var string
@ -51,13 +51,6 @@ class Course
*/
private $courseLanguage;
/**
* @var string
*
* @ORM\Column(name="title", type="string", length=250, precision=0, scale=0, nullable=true, unique=false)
*/
private $title;
/**
* @var string
*
@ -199,10 +192,23 @@ class Course
private $courseTypeId;
/**
* @ORM\OneToMany(targetEntity="CourseRelUser", mappedBy="course", cascade={"persist", "remove"})
* "orphanRemoval" is needed to delete the CourseRelUser relation
* in the CourseAdmin class. The setUsers, getUsers, removeUsers and
* addUsers methods need to be added.
* @ORM\OneToMany(targetEntity="CourseRelUser", mappedBy="course", cascade={"persist"}, orphanRemoval=true)
**/
private $users;
/**
* @ORM\OneToMany(targetEntity="AccessUrlRelCourse", mappedBy="course", cascade={"persist"}, orphanRemoval=true)
**/
private $urls;
/**
* @ORM\OneToMany(targetEntity="SessionRelCourse", mappedBy="session", cascade={"persist"})
**/
private $sessions;
/**
* @ORM\OneToMany(targetEntity="CItemProperty", mappedBy="course")
**/
@ -232,6 +238,35 @@ class Course
return $this->items;
}
/**
* @return ArrayCollection
*/
public function getUrls()
{
return $this->urls;
}
/**
* @param $urls
*/
public function setUrls($urls)
{
$this->urls = new ArrayCollection();
foreach ($urls as $url) {
$this->addUrls($url);
}
}
/**
* @param AccessUrlRelCourse $url
*/
public function addUrls(AccessUrlRelCourse $url)
{
$url->setCourse($this);
$this->urls[] = $url;
}
/**
* @return ArrayCollection
*/
@ -240,11 +275,41 @@ class Course
return $this->users;
}
public function addUser(CourseRelUser $user)
/**
* @param $users
*/
public function setUsers($users)
{
$this->users = new ArrayCollection();
foreach ($users as $user) {
$this->addUsers($user);
}
}
/**
* @param CourseRelUser $user
*/
public function addUsers(CourseRelUser $user)
{
$user->setCourse($this);
$this->users[] = $user;
}
/**
* Remove $user
*
* @param CourseRelUser $user
*/
public function removeUsers(CourseRelUser $user)
{
foreach ($this->users as $key => $value) {
if ($value->getId() == $user->getId()) {
unset($this->users[$key]);
}
}
}
/**
* Set id
*
@ -311,28 +376,6 @@ class Course
return $this->directory;
}
/**
* Set dbName
*
* @param string $dbName
* @return Course
*/
public function setDbName($dbName)
{
$this->dbName = $dbName;
return $this;
}
/**
* Get dbName
*
* @return string
*/
public function getDbName()
{
return $this->dbName;
}
/**
* Set courseLanguage

@ -92,19 +92,19 @@ class CourseRelUser
//protected $cId;
/**
* @ORM\ManyToOne(targetEntity="Application\Sonata\UserBundle\Entity\User", inversedBy="courses", cascade={"persist", "remove"})
* @ORM\ManyToOne(targetEntity="Application\Sonata\UserBundle\Entity\User", inversedBy="courses", cascade={"persist"})
* @ORM\JoinColumn(name="user_id", referencedColumnName="id")
*/
protected $user;
/**
* @ORM\ManyToOne(targetEntity="Course", inversedBy="users", cascade={"persist", "remove"})
* @ORM\ManyToOne(targetEntity="Course", inversedBy="users", cascade={"persist"})
* @ORM\JoinColumn(name="c_id", referencedColumnName="id")
*/
protected $course;
/**
* @ORM\ManyToOne(targetEntity="CGroupInfo", inversedBy="course", cascade={"persist", "remove"})
* @ORM\ManyToOne(targetEntity="CGroupInfo", inversedBy="course", cascade={"persist"})
* @ORM\JoinColumn(name="group_id", referencedColumnName="iid")
*/
protected $group;
@ -116,6 +116,7 @@ class CourseRelUser
public function __construct()
{
$this->userCourseCat = 0;
}
/**
@ -178,6 +179,10 @@ class CourseRelUser
return $this->cId;
}
/**
* @param $course
* @return $this
*/
public function setCourse($course)
{
$this->course = $course;

@ -27,7 +27,7 @@ class Session
*
* @ORM\Column(name="id_coach", type="integer", precision=0, scale=0, nullable=false, unique=false)
*/
private $idCoach;
//private $idCoach;
/**
* @var string
@ -46,7 +46,7 @@ class Session
/**
* @var integer
*
* @ORM\Column(name="nbr_users", type="integer", precision=0, scale=0, nullable=false, unique=false)
* @ORM\Column(name="nbr_users", type="integer", precision=0, scale=0, nullable=true, unique=false)
*/
private $nbrUsers;
@ -74,14 +74,14 @@ class Session
/**
* @var integer
*
* @ORM\Column(name="session_category_id", type="integer", precision=0, scale=0, nullable=false, unique=false)
* @ORM\Column(name="session_category_id", type="integer", precision=0, scale=0, nullable=true, unique=false)
*/
private $sessionCategoryId;
/**
* @var integer
*
* @ORM\Column(name="promotion_id", type="integer", precision=0, scale=0, nullable=false, unique=false)
* @ORM\Column(name="promotion_id", type="integer", precision=0, scale=0, nullable=true, unique=false)
*/
private $promotionId;
@ -138,12 +138,32 @@ class Session
**/
private $generalCoach;
/**
* @ORM\OneToMany(targetEntity="SessionRelCourse", mappedBy="session", cascade={"persist"}, orphanRemoval=true)
**/
protected $courses;
/**
*
*/
public function __construct()
{
$this->items = new ArrayCollection();
$this->displayStartDate = new \DateTime();
$this->displayEndDate = new \DateTime();
$this->accessStartDate = new \DateTime();
$this->accessEndDate = new \DateTime();
$this->coachAccessStartDate = new \DateTime();
$this->coachAccessEndDate = new \DateTime();
}
/**
* @return string
*/
public function __toString()
{
return (string) $this->getName();
}
/**
@ -161,6 +181,49 @@ class Session
$this->id = $id;
}
/**
* @return
*/
public function getCourses()
{
return $this->courses;
}
/**
* @param $courses
*/
public function setCourses($courses)
{
$this->courses = new ArrayCollection();
foreach ($courses as $course) {
$this->addCourses($course);
}
}
/**
* @param SessionRelCourse $course
*/
public function addCourses(SessionRelCourse $course)
{
$course->setSession($this);
$this->courses[] = $course;
}
/**
* Remove $user
*
* @param SessionRelCourse $course
*/
public function removeCourses($course)
{
foreach ($this->courses as $key => $value) {
if ($value->getId() == $course->getId()) {
unset($this->courses[$key]);
}
}
}
/**
* Set idCoach
*

@ -0,0 +1,183 @@
<?php
namespace ChamiloLMS\CoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* SessionRelCourse
*
* @ORM\Table(name="session_rel_course")
* @ORM\Entity
*/
class SessionRelCourse
{
/**
* @var integer
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var integer
*
* @ORM\Column(name="id_session", type="integer")
*/
//private $idSession;
/**
* @var integer
*
* @ORM\Column(name="c_id", type="integer")
*/
//private $cId;
/**
* @var integer
*
* @ORM\Column(name="nbr_users", type="integer")
*/
private $nbrUsers;
/**
* @ORM\ManyToOne(targetEntity="Session", inversedBy="courses", cascade={"persist"})
* @ORM\JoinColumn(name="id_session", referencedColumnName="id")
*/
private $session;
/**
* @ORM\ManyToOne(targetEntity="Course", inversedBy="sessions", cascade={"persist"})
* @ORM\JoinColumn(name="c_id", referencedColumnName="id")
*/
protected $course;
public function __construct()
{
$this->nbrUsers = 0;
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* @param $session
* @return $this
*/
public function setSession($session)
{
$this->session = $session;
return $this;
}
/**
* Get Session
*
* @return string
*/
public function getCourse()
{
return $this->course;
}
/**
* @param $course
* @return $this
*/
public function setCourse($course)
{
$this->course = $course;
return $this;
}
/**
* Get Session
*
* @return string
*/
public function getSession()
{
return $this->session;
}
/**
* Set idSession
*
* @param integer $idSession
* @return SessionRelCourse
*/
public function setIdSession($idSession)
{
$this->idSession = $idSession;
return $this;
}
/**
* Get idSession
*
* @return integer
*/
public function getIdSession()
{
return $this->idSession;
}
/**
* Set cId
*
* @param integer $cId
* @return SessionRelCourse
*/
public function setCId($cId)
{
$this->cId = $cId;
return $this;
}
/**
* Get cId
*
* @return integer
*/
public function getCId()
{
return $this->cId;
}
/**
* Set nbrUsers
*
* @param integer $nbrUsers
* @return SessionRelCourse
*/
public function setNbrUsers($nbrUsers)
{
$this->nbrUsers = $nbrUsers;
return $this;
}
/**
* Get nbrUsers
*
* @return integer
*/
public function getNbrUsers()
{
return $this->nbrUsers;
}
}

@ -31,3 +31,37 @@ services:
- ~
calls:
- [ setTranslationDomain, [ChamiloLMSCoreBundle]]
sonata.admin.session_rel_course:
class: ChamiloLMS\CoreBundle\Admin\SessionRelCourseAdmin
tags:
- { name: sonata.admin, manager_type: orm, group: "LMS", label: "SessionRelCourseAdmin" }
arguments:
- ~
- ChamiloLMS\CoreBundle\Entity\SessionRelCourse
- ~
calls:
- [ setTranslationDomain, [ChamiloLMSCoreBundle]]
sonata.admin.access_url:
class: ChamiloLMS\CoreBundle\Admin\AccessUrlAdmin
tags:
- { name: sonata.admin, manager_type: orm, group: "LMS", label: "AccessUrlAdmin" }
arguments:
- ~
- ChamiloLMS\CoreBundle\Entity\AccessUrl
- ~
calls:
- [ setTranslationDomain, [ChamiloLMSCoreBundle]]
sonata.admin.access_url_rel_course:
class: ChamiloLMS\CoreBundle\Admin\AccessUrlRelCourseAdmin
tags:
- { name: sonata.admin, manager_type: orm, group: "LMS", label: "AccessUrlRelCourseAdmin" }
arguments:
- ~
- ChamiloLMS\CoreBundle\Entity\AccessUrlRelCourse
- ~
calls:
- [ setTranslationDomain, [ChamiloLMSCoreBundle]]

Loading…
Cancel
Save