You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
998 B
35 lines
998 B
|
7 years ago
|
<?php
|
||
|
|
/* For licensing terms, see /license.txt */
|
||
|
|
|
||
|
|
namespace Chamilo\CoreBundle\Repository;
|
||
|
|
|
||
|
|
use APY\DataGridBundle\Grid\Column\Column;
|
||
|
|
use APY\DataGridBundle\Grid\Grid;
|
||
|
|
use Chamilo\CoreBundle\Entity\Course;
|
||
|
|
use Chamilo\CoreBundle\Entity\Resource\ResourceNode;
|
||
|
|
use Doctrine\Common\Collections\Criteria;
|
||
|
|
use Doctrine\ORM\Query\Expr\Join;
|
||
|
|
use Doctrine\ORM\QueryBuilder;
|
||
|
|
use Symfony\Component\Form\FormInterface;
|
||
|
|
|
||
|
|
class PersonalFileRepository extends ResourceRepository implements ResourceRepositoryInterface
|
||
|
|
{
|
||
|
|
public function saveResource(FormInterface $form, $course, $session, $fileType)
|
||
|
|
{
|
||
|
|
$newResource = $form->getData();
|
||
|
|
$newResource
|
||
|
|
//->setCourse($course)
|
||
|
|
//->setSession($session)
|
||
|
|
//->setFiletype($fileType)
|
||
|
|
//->setTitle($title) // already added in $form->getData()
|
||
|
|
;
|
||
|
|
|
||
|
|
return $newResource;
|
||
|
|
}
|
||
|
|
|
||
|
|
public function getTitleColumn(Grid $grid): Column
|
||
|
|
{
|
||
|
|
return $grid->getColumn('name');
|
||
|
|
}
|
||
|
|
}
|