parent
6447ad8d91
commit
361acb67b3
@ -0,0 +1,44 @@ |
|||||||
|
<?php |
||||||
|
/* For licensing terms, see /license.txt */ |
||||||
|
|
||||||
|
namespace Chamilo\CoreBundle\Component\Editor\CkEditor\Toolbar; |
||||||
|
|
||||||
|
/** |
||||||
|
* Toolbar used to allow titles to have an HTML format. |
||||||
|
* |
||||||
|
* @package Chamilo\CoreBundle\Component\Editor\CkEditor\Toolbar |
||||||
|
*/ |
||||||
|
class TitleAsHtml extends Basic |
||||||
|
{ |
||||||
|
/** |
||||||
|
* @return mixed |
||||||
|
*/ |
||||||
|
public function getConfig() |
||||||
|
{ |
||||||
|
$config['toolbar'] = [ |
||||||
|
[ |
||||||
|
'name' => 'clipboard', |
||||||
|
'groups' => ['clipboard', 'undo'], |
||||||
|
'items' => ['Cut', 'Copy', 'Paste', '-', 'Undo', 'Redo'], |
||||||
|
], |
||||||
|
[ |
||||||
|
'name' => 'basicstyles', |
||||||
|
'groups' => ['basicstyles', 'cleanup'], |
||||||
|
'items' => ['Bold', 'Italic', 'Underline', 'Strike', 'TextColor', 'BGColor'], |
||||||
|
], |
||||||
|
// [ |
||||||
|
// 'name' => 'paragraph', |
||||||
|
// 'groups' => ['list', 'indent', 'blocks', 'align', 'bidi'], |
||||||
|
// 'items' => ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent'], |
||||||
|
// ], |
||||||
|
[ |
||||||
|
'name' => 'links', |
||||||
|
'items' => ['Link', 'Unlink', 'Source'], |
||||||
|
], |
||||||
|
]; |
||||||
|
|
||||||
|
$config['height'] = '100'; |
||||||
|
|
||||||
|
return $config; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,219 @@ |
|||||||
|
<?php |
||||||
|
/* For licensing terms, see /license.txt */ |
||||||
|
|
||||||
|
namespace Chamilo\CourseBundle\Entity; |
||||||
|
|
||||||
|
use Doctrine\ORM\Mapping as ORM; |
||||||
|
use Gedmo\Mapping\Annotation as Gedmo; |
||||||
|
|
||||||
|
/** |
||||||
|
* CExerciseCategory. |
||||||
|
* |
||||||
|
* @ORM\Table(name="c_exercise_category") |
||||||
|
* @ORM\Entity(repositoryClass="Gedmo\Sortable\Entity\Repository\SortableRepository") |
||||||
|
*/ |
||||||
|
class CExerciseCategory |
||||||
|
{ |
||||||
|
/** |
||||||
|
* @var int |
||||||
|
* |
||||||
|
* @ORM\Column(name="id", type="bigint") |
||||||
|
* @ORM\Id |
||||||
|
* @ORM\GeneratedValue |
||||||
|
*/ |
||||||
|
protected $id; |
||||||
|
|
||||||
|
/** |
||||||
|
* @var int |
||||||
|
* |
||||||
|
* @Gedmo\SortableGroup |
||||||
|
* @ORM\ManyToOne(targetEntity="Chamilo\CourseBundle\Entity\CExerciseCategory", inversedBy="children") |
||||||
|
* @ORM\JoinColumn(referencedColumnName="id", onDelete="SET NULL") |
||||||
|
* |
||||||
|
* @ORM\Column(name="c_id", type="integer") |
||||||
|
*/ |
||||||
|
protected $cId; |
||||||
|
|
||||||
|
/** |
||||||
|
* @var string |
||||||
|
* |
||||||
|
* @ORM\Column(name="name", type="string", length=255, nullable=false) |
||||||
|
*/ |
||||||
|
protected $name; |
||||||
|
|
||||||
|
/** |
||||||
|
* @var string |
||||||
|
* |
||||||
|
* @ORM\Column(name="description", type="text", nullable=true) |
||||||
|
*/ |
||||||
|
protected $description; |
||||||
|
|
||||||
|
/** |
||||||
|
* @Gedmo\SortablePosition |
||||||
|
* @ORM\Column(name="position", type="integer") |
||||||
|
*/ |
||||||
|
protected $position; |
||||||
|
|
||||||
|
/** |
||||||
|
* @var \DateTime |
||||||
|
* |
||||||
|
* @ORM\Column(name="created_at", type="datetime", nullable=false) |
||||||
|
*/ |
||||||
|
protected $createdAt; |
||||||
|
|
||||||
|
/** |
||||||
|
* @var \DateTime |
||||||
|
* |
||||||
|
* @ORM\Column(name="updated_at", type="datetime", nullable=false) |
||||||
|
*/ |
||||||
|
protected $updatedAt; |
||||||
|
|
||||||
|
/** |
||||||
|
* Project constructor. |
||||||
|
*/ |
||||||
|
public function __construct() |
||||||
|
{ |
||||||
|
$this->createdAt = new \DateTime(); |
||||||
|
$this->updatedAt = new \DateTime(); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* @return int |
||||||
|
*/ |
||||||
|
public function getId() |
||||||
|
{ |
||||||
|
return $this->id; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* @param int $id |
||||||
|
* |
||||||
|
* @return CExerciseCategory |
||||||
|
*/ |
||||||
|
public function setId($id) |
||||||
|
{ |
||||||
|
$this->id = $id; |
||||||
|
|
||||||
|
return $this; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* @return int |
||||||
|
*/ |
||||||
|
public function getCId() |
||||||
|
{ |
||||||
|
return $this->cId; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* @param int $cId |
||||||
|
* |
||||||
|
* @return CExerciseCategory |
||||||
|
*/ |
||||||
|
public function setCId($cId) |
||||||
|
{ |
||||||
|
$this->cId = $cId; |
||||||
|
|
||||||
|
return $this; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* @return string |
||||||
|
*/ |
||||||
|
public function getName() |
||||||
|
{ |
||||||
|
return $this->name; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* @param string $name |
||||||
|
* |
||||||
|
* @return CExerciseCategory |
||||||
|
*/ |
||||||
|
public function setName($name) |
||||||
|
{ |
||||||
|
$this->name = $name; |
||||||
|
|
||||||
|
return $this; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* @return string |
||||||
|
*/ |
||||||
|
public function getDescription() |
||||||
|
{ |
||||||
|
return $this->description; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* @param string $description |
||||||
|
* |
||||||
|
* @return CExerciseCategory |
||||||
|
*/ |
||||||
|
public function setDescription($description) |
||||||
|
{ |
||||||
|
$this->description = $description; |
||||||
|
|
||||||
|
return $this; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* @return \DateTime |
||||||
|
*/ |
||||||
|
public function getCreatedAt() |
||||||
|
{ |
||||||
|
return $this->createdAt; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* @param \DateTime $createdAt |
||||||
|
* |
||||||
|
* @return CExerciseCategory |
||||||
|
*/ |
||||||
|
public function setCreatedAt($createdAt) |
||||||
|
{ |
||||||
|
$this->createdAt = $createdAt; |
||||||
|
|
||||||
|
return $this; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* @return \DateTime |
||||||
|
*/ |
||||||
|
public function getUpdatedAt() |
||||||
|
{ |
||||||
|
return $this->updatedAt; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* @param \DateTime $updatedAt |
||||||
|
* |
||||||
|
* @return CExerciseCategory |
||||||
|
*/ |
||||||
|
public function setUpdatedAt($updatedAt) |
||||||
|
{ |
||||||
|
$this->updatedAt = $updatedAt; |
||||||
|
|
||||||
|
return $this; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* @return mixed |
||||||
|
*/ |
||||||
|
public function getPosition() |
||||||
|
{ |
||||||
|
return $this->position; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* @param mixed $position |
||||||
|
* |
||||||
|
* @return CExerciseCategory |
||||||
|
*/ |
||||||
|
public function setPosition($position) |
||||||
|
{ |
||||||
|
$this->position = $position; |
||||||
|
|
||||||
|
return $this; |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue