Closed ibrasdev closed 6 years ago
I think you are missing the Doctrine mapping in the others fields. If you want to persist the rest of the fields you have to do something like this:
/**
* @var int
*
* @Orm\Column(name="id", type="integer")
* @Orm\Id
* @Orm\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @var string
* @Orm\Column(name="title", type="string")
*/
protected $title;
//the same for the others fields ...
Hello,
Ive followed the entire guide to install the calendar. This is myclass EventCustom.php in /RDVBundle/Entity/EventCustom.php `<?php
namespace RDVBundle\Entity;
use AncaRebeca\FullCalendarBundle\Model\FullCalendarEvent; use Doctrine\ORM\Mapping as ORM;
/**
class CalendarEvent extends FullCalendarEvent { /**
@ORM\GeneratedValue(strategy="AUTO") */ protected $id;
/**
@var array */ protected $customFields = [];
/**
@param \DateTime $start */ public function __construct($title, \DateTime $start) { $this->title = $title; $this->startDate = $start; }
/**
@return int */ public function getId() { return $this->id; }
/**
@param int $id */ public function setId($id) { $this->id = $id; }
/**
@return string */ public function getTitle() { return $this->title; }
/**
@param string $title */ public function setTitle($title) { $this->title = $title; }
/**
@return boolean */ public function isAllDay() { return $this->allDay; }
/**
@param boolean $allDay */ public function setAllDay($allDay) { $this->allDay = $allDay; }
/**
@return \DateTime */ public function getStartDate() { return $this->startDate; }
/**
@param \DateTime $startDate */ public function setStartDate(\DateTime $startDate) { $this->startDate = $startDate; }
/**
@return \DateTime */ public function getEndDate() { return $this->endDate; }
/**
@param \DateTime $endDate */ public function setEndDate(\DateTime $endDate) { $this->endDate = $endDate; }
/**
@return string */ public function getUrl() { return $this->url; }
/**
@param string $url */ public function setUrl($url) { $this->url = $url; }
/**
@return string */ public function getClassName() { return $this->className; }
/**
@param string $className */ public function setClassName($className) { $this->className = $className; }
/**
@return boolean */ public function isEditable() { return $this->editable; }
/**
@param boolean $editable */ public function setEditable($editable) { $this->editable = $editable; }
/**
@return boolean */ public function isStartEditable() { return $this->startEditable; }
/**
@param boolean $startEditable */ public function setStartEditable($startEditable) { $this->startEditable = $startEditable; }
/**
@return boolean */ public function isDurationEditable() { return $this->durationEditable; }
/**
@param boolean $durationEditable */ public function setDurationEditable($durationEditable) { $this->durationEditable = $durationEditable; }
/**
@return string */ public function getRendering() { return $this->rendering; }
/**
@param string $rendering */ public function setRendering($rendering) { $this->rendering = $rendering; }
/**
@return boolean */ public function isOverlap() { return $this->overlap; }
/**
@param boolean $overlap */ public function setOverlap($overlap) { $this->overlap = $overlap; }
/**
@return int */ public function getConstraint() { return $this->constraint; }
/**
@param int $constraint */ public function setConstraint($constraint) { $this->constraint = $constraint; }
/**
@return string */ public function getSource() { return $this->source; }
/**
@param string $source */ public function setSource($source) { $this->source = $source; }
/**
@return string */ public function getColor() { return $this->color; }
/**
@param string $color */ public function setColor($color) { $this->color = $color; }
/**
@return string */ public function getBackgroundColor() { return $this->backgroundColor; }
/**
@param string $backgroundColor */ public function setBackgroundColor($backgroundColor) { $this->backgroundColor = $backgroundColor; }
/**
@return string */ public function getTextColor() { return $this->textColor; }
/**
@param string $textColor */ public function setTextColor($textColor) { $this->textColor = $textColor; }
/**
@return mixed */ public function setCustomField($name, $value) { $this->customFields[$name] = $value; }
/**
@return mixed */ public function getCustomFieldValue($name) { return $this->customFields[$name]; }
/**
@return array */ public function getCustomFields() { return $this->customFields; }
/**
@return mixed */ public function removeCustomField($name) { if (!isset($this->customFields[$name]) && !array_key_exists($name, $this->customFields)) { return null; }
}
/**
@return array */ public function toArray() { $event = [];
} }` But when i do a dump-sql, only the id field is added to the dababase.
Thanks a lot