Internal: Remove APY\DataGridBundle

pull/3466/head
Julio Montoya 5 years ago
parent 0334ca50e5
commit 00202984d8
  1. 1
      config/bundles.php
  2. 41
      config/services.yaml
  3. 3
      src/CoreBundle/Controller/EditorController.php
  4. 8
      src/CoreBundle/Controller/ResourceController.php
  5. 2
      src/CoreBundle/Entity/Illustration.php
  6. 2
      src/CoreBundle/Entity/PersonalFile.php
  7. 26
      src/CoreBundle/Entity/ResourceNode.php
  8. 35
      src/CoreBundle/Grid/Column/IconColumn.php
  9. 4
      src/CoreBundle/Repository/GridInterface.php
  10. 2
      src/CoreBundle/Repository/IllustrationRepository.php
  11. 2
      src/CoreBundle/Repository/PersonalFileRepository.php
  12. 2
      src/CoreBundle/Repository/ResourceRepository.php
  13. 6
      src/CoreBundle/Resources/config/services.yml
  14. 3
      src/CourseBundle/Entity/CCourseDescription.php
  15. 3
      src/CourseBundle/Entity/CExerciseCategory.php
  16. 2
      src/CourseBundle/Entity/CGlossary.php
  17. 2
      src/CourseBundle/Entity/CLink.php
  18. 2
      src/CourseBundle/Entity/CShortcut.php
  19. 2
      src/CourseBundle/Entity/CTool.php
  20. 2
      src/CourseBundle/Repository/CCourseDescriptionRepository.php
  21. 2
      src/CourseBundle/Repository/CDocumentRepository.php
  22. 2
      src/CourseBundle/Repository/CGlossaryRepository.php
  23. 2
      src/CourseBundle/Repository/CLinkCategoryRepository.php
  24. 2
      src/CourseBundle/Repository/CLinkRepository.php

@ -22,7 +22,6 @@ return [
A2lix\AutoFormBundle\A2lixAutoFormBundle::class => ['all' => true],
A2lix\TranslationFormBundle\A2lixTranslationFormBundle::class => ['all' => true],
Oneup\UploaderBundle\OneupUploaderBundle::class => ['all' => true],
APY\DataGridBundle\APYDataGridBundle::class => ['all' => true],
Gregwar\CaptchaBundle\GregwarCaptchaBundle::class => ['all' => true],
Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true],
Liip\ImagineBundle\LiipImagineBundle::class => ['all' => true],

@ -73,15 +73,6 @@ services:
class: Chamilo\LtiBundle\Util\Utils
arguments: ['@chamilo.settings.manager']
apy_grid.factory:
class: APY\DataGridBundle\Grid\GridFactory
arguments: ['@service_container', '@apy_grid.registry']
public: true
apy_grid.registry:
class: APY\DataGridBundle\Grid\GridRegistry
public: true
League\Flysystem\MountManager: '@oneup_flysystem.mount_manager'
Chamilo\CoreBundle\Security\HTTPExceptionListener:
@ -96,22 +87,22 @@ sylius_settings:
# audit:
# force: false # Audits are set in the admin.yml files with audit:true
# Grid default template
apy_data_grid:
theme: '@ChamiloCore/Resource/grid_theme.html.twig'
limits: [20, 50, 100]
persistence: false
# no_data_message: "No data"
# no_result_message: "No result"
# actions_columns_size: -1
# actions_columns_title: "Actions"
# actions_columns_separator: "<br />"
pagerfanta:
enable: true
view_class: 'Pagerfanta\View\TwitterBootstrap4View'
options:
prev_message: "«"
next_message: "»"
## Grid default template
#apy_data_grid:
# theme: '@ChamiloCore/Resource/grid_theme.html.twig'
# limits: [20, 50, 100]
# persistence: false
## no_data_message: "No data"
## no_result_message: "No result"
## actions_columns_size: -1
## actions_columns_title: "Actions"
## actions_columns_separator: "<br />"
# pagerfanta:
# enable: true
# view_class: 'Pagerfanta\View\TwitterBootstrap4View'
# options:
# prev_message: "«"
# next_message: "»"
# Course settings
chamilo_course:

@ -4,9 +4,6 @@
namespace Chamilo\CoreBundle\Controller;
use APY\DataGridBundle\Grid\Grid;
use APY\DataGridBundle\Grid\Row;
use APY\DataGridBundle\Grid\Source\Entity;
use Chamilo\CoreBundle\Component\Editor\CkEditor\CkEditor;
use Chamilo\CoreBundle\Component\Editor\Connector;
use Chamilo\CoreBundle\Component\Utils\ChamiloApi;

@ -4,14 +4,6 @@
namespace Chamilo\CoreBundle\Controller;
use APY\DataGridBundle\Grid\Action\MassAction;
use APY\DataGridBundle\Grid\Action\RowAction;
use APY\DataGridBundle\Grid\Column\Column;
use APY\DataGridBundle\Grid\Export\CSVExport;
use APY\DataGridBundle\Grid\Export\ExcelExport;
use APY\DataGridBundle\Grid\Grid;
use APY\DataGridBundle\Grid\Row;
use APY\DataGridBundle\Grid\Source\Entity;
use Chamilo\CoreBundle\Entity\AbstractResource;
use Chamilo\CoreBundle\Entity\ResourceInterface;
use Chamilo\CoreBundle\Entity\ResourceLink;

@ -5,7 +5,6 @@
namespace Chamilo\CoreBundle\Entity;
use ApiPlatform\Core\Annotation\ApiResource;
use APY\DataGridBundle\Grid\Mapping as GRID;
use Chamilo\CourseBundle\Traits\PersonalResourceTrait;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Timestampable\Traits\TimestampableEntity;
@ -19,7 +18,6 @@ use Symfony\Component\Serializer\Annotation\Groups;
* )
* @ORM\Table(name="illustration")
* @ORM\Entity
* @GRID\Source(columns="id, name, resourceNode.createdAt", filterable=false, groups={"resource"})
*/
class Illustration extends AbstractResource implements ResourceInterface
{

@ -4,7 +4,6 @@
namespace Chamilo\CoreBundle\Entity;
use APY\DataGridBundle\Grid\Mapping as GRID;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Timestampable\Traits\TimestampableEntity;
@ -13,7 +12,6 @@ use Gedmo\Timestampable\Traits\TimestampableEntity;
*
* @ORM\Table(name="personal_file")
* @ORM\Entity
* @GRID\Source(columns="id, name, resourceNode.createdAt", filterable=false, groups={"resource"})
*/
class PersonalFile extends AbstractResource implements ResourceInterface
{

@ -57,13 +57,6 @@ class ResourceNode
*/
protected $id;
/**
* @var UuidInterface|null
*
* @ORM\Column(type="uuid", unique=true)
*/
protected $uuid;
/**
* @Assert\NotBlank()
* @Groups({"resource_node:read", "resource_node:write", "document:read", "document:write"})
@ -81,6 +74,13 @@ class ResourceNode
*/
protected $slug;
/**
* @var UuidInterface|null
*
* @ORM\Column(type="uuid", unique=true)
*/
protected $uuid;
/**
* @ORM\ManyToOne(targetEntity="ResourceType")
* @ORM\JoinColumn(name="resource_type_id", referencedColumnName="id", nullable=false)
@ -225,18 +225,6 @@ class ResourceNode
return $this->id;
}
/**
* @param int $id
*
* @return $this
*/
public function setId($id)
{
$this->id = $id;
return $this;
}
/**
* Returns the resource creator.
*

@ -1,35 +0,0 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\CoreBundle\Grid\Column;
use APY\DataGridBundle\Grid\Column\Column;
/**
* Class IconColumn.
*/
class IconColumn extends Column
{
public function __initialize(array $params)
{
$params['filterable'] = false;
$params['sortable'] = false;
parent::__initialize($params);
}
public function getType()
{
return 'icon';
}
public function renderCell($value, $row, $router)
{
if ($value) {
return "<img src=\"{{ '/".$value."' | apply_filter('small') }}\">";
}
return false;
}
}

@ -4,8 +4,6 @@
namespace Chamilo\CoreBundle\Repository;
use APY\DataGridBundle\Grid\Column\Column;
use APY\DataGridBundle\Grid\Grid;
use Chamilo\CoreBundle\Component\Resource\Settings;
use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Entity\ResourceNode;
@ -20,8 +18,6 @@ interface GridInterface
public function setResourceProperties(FormInterface $form, Course $course, Session $session, $fileType);
public function getTitleColumn(Grid $grid): Column;
public function getResourceFormType(): string;
public function getResourceSettings(): Settings;

@ -4,8 +4,6 @@
namespace Chamilo\CoreBundle\Repository;
use APY\DataGridBundle\Grid\Column\Column;
use APY\DataGridBundle\Grid\Grid;
use Chamilo\CoreBundle\Entity\AbstractResource;
use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Entity\Illustration;

@ -4,8 +4,6 @@
namespace Chamilo\CoreBundle\Repository;
use APY\DataGridBundle\Grid\Column\Column;
use APY\DataGridBundle\Grid\Grid;
use Chamilo\CoreBundle\Component\Resource\Settings;
use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Entity\ResourceNode;

@ -4,8 +4,6 @@
namespace Chamilo\CoreBundle\Repository;
use APY\DataGridBundle\Grid\Action\RowAction;
use APY\DataGridBundle\Grid\Row;
use Chamilo\CoreBundle\Component\Resource\Settings;
use Chamilo\CoreBundle\Component\Resource\Template;
use Chamilo\CoreBundle\Entity\AbstractResource;

@ -23,12 +23,6 @@ services:
resource: '../../Controller'
tags: ['controller.service_arguments']
apy_grid.factory:
class: APY\DataGridBundle\Grid\GridFactory
arguments: ['@service_container', '@apy_grid.registry']
APY\DataGridBundle\Grid\Grid: '@grid'
menu.voter.regex:
class: Chamilo\CoreBundle\Menu\MenuVoter
arguments: ['@request_stack']

@ -4,7 +4,6 @@
namespace Chamilo\CourseBundle\Entity;
use APY\DataGridBundle\Grid\Mapping as GRID;
use Chamilo\CoreBundle\Entity\AbstractResource;
use Chamilo\CoreBundle\Entity\ResourceInterface;
use Doctrine\ORM\Mapping as ORM;
@ -13,8 +12,6 @@ use Symfony\Component\Validator\Constraints as Assert;
/**
* CCourseDescription.
*
* @GRID\Source(columns="iid, title, content", filterable=false, groups={"resource"})
*
* @ORM\Table(name="c_course_description", indexes={@ORM\Index(name="session_id", columns={"session_id"})})
* @ORM\Entity
*/

@ -4,7 +4,6 @@
namespace Chamilo\CourseBundle\Entity;
use APY\DataGridBundle\Grid\Mapping as GRID;
use Chamilo\CoreBundle\Entity\AbstractResource;
use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Entity\ResourceInterface;
@ -17,10 +16,8 @@ use Symfony\Component\Validator\Constraints as Assert;
* CExerciseCategory.
*
* @ORM\Table(name="c_exercise_category")
*
* @ORM\Entity(repositoryClass="Gedmo\Sortable\Entity\Repository\SortableRepository")
*
* @GRID\Source(columns="id, name", filterable=false)
*/
class CExerciseCategory extends AbstractResource implements ResourceInterface
{

@ -4,7 +4,6 @@
namespace Chamilo\CourseBundle\Entity;
use APY\DataGridBundle\Grid\Mapping as GRID;
use Chamilo\CoreBundle\Entity\AbstractResource;
use Chamilo\CoreBundle\Entity\ResourceInterface;
use Doctrine\ORM\Mapping as ORM;
@ -13,7 +12,6 @@ use Symfony\Component\Validator\Constraints as Assert;
/**
* CGlossary.
*
* @GRID\Source(columns="iid, name, description", filterable=false, groups={"resource"})
* @ORM\Table(
* name="c_glossary",
* indexes={

@ -4,7 +4,6 @@
namespace Chamilo\CourseBundle\Entity;
use APY\DataGridBundle\Grid\Mapping as GRID;
use Chamilo\CoreBundle\Entity\AbstractResource;
use Chamilo\CoreBundle\Entity\ResourceInterface;
use Doctrine\ORM\Mapping as ORM;
@ -21,7 +20,6 @@ use Symfony\Component\Validator\Constraints as Assert;
* }
* )
* @ORM\Entity
* @GRID\Source(columns="iid, title, resourceNode.createdAt", filterable=false, groups={"resource"})
*/
class CLink extends AbstractResource implements ResourceInterface
{

@ -4,7 +4,6 @@
namespace Chamilo\CourseBundle\Entity;
use APY\DataGridBundle\Grid\Mapping as GRID;
use Chamilo\CoreBundle\Entity\AbstractResource;
use Chamilo\CoreBundle\Entity\ResourceInterface;
use Doctrine\ORM\Mapping as ORM;
@ -13,7 +12,6 @@ use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Table(name="c_shortcut")
* @ORM\Entity
* @GRID\Source(columns="id, name, resourceNode.createdAt", filterable=false, groups={"resource"})
*/
class CShortcut extends AbstractResource implements ResourceInterface
{

@ -4,7 +4,6 @@
namespace Chamilo\CourseBundle\Entity;
use APY\DataGridBundle\Grid\Mapping as GRID;
use Chamilo\CoreBundle\Entity\AbstractResource;
use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Entity\ResourceInterface;
@ -27,7 +26,6 @@ use Symfony\Component\Validator\Constraints as Assert;
* }
* )
* @ORM\Entity
* @GRID\Source(columns="iid, name, resourceNode.createdAt", filterable=false, groups={"resource"})
*/
class CTool extends AbstractResource implements ResourceInterface
{

@ -4,8 +4,6 @@
namespace Chamilo\CourseBundle\Repository;
use APY\DataGridBundle\Grid\Column\Column;
use APY\DataGridBundle\Grid\Grid;
use Chamilo\CoreBundle\Component\Resource\Settings;
use Chamilo\CoreBundle\Component\Resource\Template;
use Chamilo\CoreBundle\Entity\Course;

@ -4,8 +4,6 @@
namespace Chamilo\CourseBundle\Repository;
use APY\DataGridBundle\Grid\Column\Column;
use APY\DataGridBundle\Grid\Grid;
use Chamilo\CoreBundle\Component\Resource\Settings;
use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Entity\ResourceLink;

@ -4,8 +4,6 @@
namespace Chamilo\CourseBundle\Repository;
use APY\DataGridBundle\Grid\Column\Column;
use APY\DataGridBundle\Grid\Grid;
use Chamilo\CoreBundle\Component\Resource\Settings;
use Chamilo\CoreBundle\Component\Resource\Template;
use Chamilo\CoreBundle\Entity\Course;

@ -4,8 +4,6 @@
namespace Chamilo\CourseBundle\Repository;
use APY\DataGridBundle\Grid\Column\Column;
use APY\DataGridBundle\Grid\Grid;
use Chamilo\CoreBundle\Component\Resource\Settings;
use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Entity\ResourceNode;

@ -4,8 +4,6 @@
namespace Chamilo\CourseBundle\Repository;
use APY\DataGridBundle\Grid\Column\Column;
use APY\DataGridBundle\Grid\Grid;
use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Entity\ResourceNode;
use Chamilo\CoreBundle\Entity\Session;

Loading…
Cancel
Save