Created
May 26, 2014 12:53
-
-
Save phmLabs/9c7e06e5d7854b4dc69f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$event = $this->getDoctrine() | |
->getRepository('WeTimeboxBundle:Event') | |
->findBy(array("edit_id" => $eventId)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace PhmLabs\Bundle\WeTimeboxBundle\Entity; | |
use Doctrine\ORM\Mapping as ORM; | |
/** | |
* @ORM\Entity | |
* @ORM\Table(name="events") | |
*/ | |
class Event { | |
/** | |
* @ORM\Column(type="integer") | |
* @ORM\Id | |
* @ORM\GeneratedValue(strategy="AUTO") | |
*/ | |
protected $id; | |
/** | |
* @ORM\Column(type="string", length=100) | |
*/ | |
protected $readonly_id; | |
/** | |
* @ORM\Column(type="string", length=100) | |
*/ | |
protected $edit_id; | |
/** | |
* @ORM\Column(type="string", length=255) | |
*/ | |
protected $title; | |
/** | |
* @ORM\Column(type="text") | |
*/ | |
protected $description; | |
/** | |
* @ORM\Column(type="string", length=20) | |
*/ | |
protected $start_date; | |
/** | |
* @ORM\Column(type="string", length=255) | |
*/ | |
protected $company_logo; | |
/** | |
* @ORM\Column(type="boolean") | |
*/ | |
protected $public; | |
/** | |
* @ORM\OneToMany(targetEntity="Item", mappedBy="event_id") | |
*/ | |
protected $items; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace PhmLabs\Bundle\WeTimeboxBundle\Entity; | |
use Doctrine\ORM\Mapping as ORM; | |
/** | |
* @ORM\Entity | |
* @ORM\Table(name="items") | |
*/ | |
class Item { | |
/** | |
* @ORM\Column(type="integer") | |
* @ORM\Id | |
* @ORM\GeneratedValue(strategy="AUTO") | |
*/ | |
protected $id; | |
/** | |
* @ORM\Column(type="integer") | |
*/ | |
protected $event_id; | |
/** | |
* @ORM\Column(type="string", length=255) | |
*/ | |
protected $title; | |
/** | |
* @ORM\Column(type="text") | |
*/ | |
protected $description; | |
/** | |
* @ORM\Column(type="string", length=5) | |
*/ | |
protected $duration; | |
/** | |
* @ORM\Column(type="integer", length=3) | |
*/ | |
protected $position; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
und Items im constructor als Collection initialisieren:
und der schönheit halber noch alles private machen ;)