parent
d091e50639
commit
f0f631a09e
@ -1,3 +1,5 @@ |
||||
mopa_bootstrap: |
||||
form: ~ # Adds twig form theme support |
||||
# form: # Adds twig form theme support |
||||
# horizontal_label_class: 'aa' |
||||
# horizontal_input_wrapper_class: 'dd' |
||||
menu: ~ # enables twig helpers for menu |
||||
|
@ -0,0 +1,16 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
namespace Chamilo\CoreBundle\Entity\Repository; |
||||
|
||||
use Doctrine\Common\Collections\Criteria; |
||||
use Doctrine\ORM\EntityRepository; |
||||
use Gedmo\Tree\Entity\Repository\NestedTreeRepository; |
||||
|
||||
/** |
||||
* Class ResourceNodeRepository |
||||
* @package Chamilo\CoreBundle\Entity\Repository |
||||
*/ |
||||
class ResourceNodeRepository extends EntityRepository |
||||
{ |
||||
} |
@ -0,0 +1,71 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
namespace Chamilo\NotebookBundle\Form\Type; |
||||
|
||||
use Chamilo\CoreBundle\Entity\ToolResourceRights; |
||||
use Symfony\Component\Form\AbstractType; |
||||
use Symfony\Component\Form\FormBuilderInterface; |
||||
use Symfony\Component\OptionsResolver\OptionsResolver; |
||||
|
||||
/** |
||||
* Class ResourceLinkType |
||||
* @package Chamilo\NotebookBundle\Form\Type |
||||
*/ |
||||
class ResourceLinkType extends AbstractType |
||||
{ |
||||
/** |
||||
* {@inheritdoc} |
||||
*/ |
||||
public function buildForm(FormBuilderInterface $builder, array $options) |
||||
{ |
||||
$builder |
||||
->add( |
||||
'sharing', |
||||
'choice', |
||||
array( |
||||
'choices' => array( |
||||
'public' => 'Public', |
||||
//'private' => 'Only me', |
||||
'this_course' => 'This course', |
||||
'another_course' => 'Another course', |
||||
'user'=> 'User' |
||||
), |
||||
'attr' => array('class' => 'sharing_options') |
||||
) |
||||
) |
||||
->add('search', 'hidden', array('attr' => array('class' => 'extra_hidden'))) |
||||
->add( |
||||
'mask', |
||||
'choice', |
||||
array('choices' => ToolResourceRights::getMaskList()) |
||||
) |
||||
/*->add( |
||||
'rights', |
||||
'collection', |
||||
array( |
||||
'type' => new ResourceRightsType(), |
||||
'allow_add' => true, |
||||
) |
||||
)*/ |
||||
; |
||||
} |
||||
|
||||
/** |
||||
* {@inheritdoc} |
||||
*/ |
||||
public function configureOptions(OptionsResolver $resolver) |
||||
{ |
||||
$resolver->setDefaults(array( |
||||
'data_class' => 'Chamilo\CoreBundle\Entity\Resource\ResourceLink' |
||||
)); |
||||
} |
||||
|
||||
/** |
||||
* {@inheritdoc} |
||||
*/ |
||||
public function getName() |
||||
{ |
||||
return 'chamilo_resource_link_type'; |
||||
} |
||||
} |
@ -0,0 +1,46 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
namespace Chamilo\NotebookBundle\Form\Type; |
||||
|
||||
use Symfony\Component\Form\AbstractType; |
||||
use Symfony\Component\Form\FormBuilderInterface; |
||||
use Symfony\Component\OptionsResolver\OptionsResolver; |
||||
|
||||
/** |
||||
* Class ResourceNodeType |
||||
* @package Chamilo\NotebookBundle\Form\Type |
||||
*/ |
||||
class ResourceNodeType extends AbstractType |
||||
{ |
||||
/** |
||||
* {@inheritdoc} |
||||
*/ |
||||
public function buildForm(FormBuilderInterface $builder, array $options) |
||||
{ |
||||
$builder |
||||
->add('tool') |
||||
->add('links', 'collection', array( |
||||
'type' =>new ResourceLinkType()) |
||||
) |
||||
; |
||||
} |
||||
|
||||
/** |
||||
* {@inheritdoc} |
||||
*/ |
||||
public function configureOptions(OptionsResolver $resolver) |
||||
{ |
||||
$resolver->setDefaults(array( |
||||
'data_class' => 'Chamilo\CoreBundle\Entity\Resource\ResourceNode' |
||||
)); |
||||
} |
||||
|
||||
/** |
||||
* {@inheritdoc} |
||||
*/ |
||||
public function getName() |
||||
{ |
||||
return 'chamilo_resource_node_type'; |
||||
} |
||||
} |
@ -0,0 +1,53 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
namespace Chamilo\NotebookBundle\Form\Type; |
||||
|
||||
use Chamilo\CoreBundle\Entity\ToolResourceRights; |
||||
use Symfony\Component\Form\AbstractType; |
||||
use Symfony\Component\Form\FormBuilderInterface; |
||||
use Symfony\Component\OptionsResolver\OptionsResolver; |
||||
|
||||
/** |
||||
* Class ResourceRightsType |
||||
* @package Chamilo\NotebookBundle\Form\Type |
||||
*/ |
||||
class ResourceRightsType extends AbstractType |
||||
{ |
||||
/** |
||||
* {@inheritdoc} |
||||
*/ |
||||
public function buildForm(FormBuilderInterface $builder, array $options) |
||||
{ |
||||
$builder |
||||
->add( |
||||
'role', |
||||
'choice', |
||||
array('choices' => ToolResourceRights::getDefaultRoles()) |
||||
) |
||||
->add( |
||||
'mask', |
||||
'choice', |
||||
array('choices' => ToolResourceRights::getMaskList()) |
||||
) |
||||
; |
||||
} |
||||
|
||||
/** |
||||
* {@inheritdoc} |
||||
*/ |
||||
public function configureOptions(OptionsResolver $resolver) |
||||
{ |
||||
$resolver->setDefaults(array( |
||||
'data_class' => 'Chamilo\CoreBundle\Entity\Resource\ResourceRights' |
||||
)); |
||||
} |
||||
|
||||
/** |
||||
* {@inheritdoc} |
||||
*/ |
||||
public function getName() |
||||
{ |
||||
return 'chamilo_resource_rights_type'; |
||||
} |
||||
} |
Loading…
Reference in new issue