Initial Commit
This commit is contained in:
163
packages/vitec/Classes/Domain/Model/Solution.php
Normal file
163
packages/vitec/Classes/Domain/Model/Solution.php
Normal file
@@ -0,0 +1,163 @@
|
||||
<?php
|
||||
|
||||
namespace Evomedien\Vitec\Domain\Model;
|
||||
|
||||
use TYPO3\CMS\Extbase\Domain\Model\Category;
|
||||
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
|
||||
use TYPO3\CMS\Extbase\Persistence\ObjectStorage;
|
||||
|
||||
class Solution extends AbstractEntity
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $title = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $subtitle = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $teaser = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $description = '';
|
||||
|
||||
/**
|
||||
* @var \TYPO3\CMS\Extbase\Domain\Model\FileReference
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Cascade("remove")
|
||||
*/
|
||||
protected $image = null;
|
||||
|
||||
/**
|
||||
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\Category>
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Lazy
|
||||
*/
|
||||
protected $categories;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->categories = new ObjectStorage();
|
||||
}
|
||||
|
||||
/* ---------------------------------------------- */
|
||||
/* Getter und Setter */
|
||||
/* ---------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getTitle(): string
|
||||
{
|
||||
return $this->title;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $title
|
||||
*/
|
||||
public function setTitle(string $title): void
|
||||
{
|
||||
$this->title = $title;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getSubtitle(): string
|
||||
{
|
||||
return $this->subtitle;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $subtitle
|
||||
*/
|
||||
public function setSubtitle(string $subtitle): void
|
||||
{
|
||||
$this->subtitle = $subtitle;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getTeaser(): string
|
||||
{
|
||||
return $this->teaser;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $teaser
|
||||
*/
|
||||
public function setTeaser(string $teaser): void
|
||||
{
|
||||
$this->teaser = $teaser;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getDescription(): string
|
||||
{
|
||||
return $this->description;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $description
|
||||
*/
|
||||
public function setDescription(string $description): void
|
||||
{
|
||||
$this->description = $description;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \TYPO3\CMS\Extbase\Domain\Model\FileReference|null
|
||||
*/
|
||||
public function getImage()
|
||||
{
|
||||
return $this->image;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $image
|
||||
*/
|
||||
public function setImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $image): void
|
||||
{
|
||||
$this->image = $image;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Category $category
|
||||
*/
|
||||
public function addCategory(Category $category): void
|
||||
{
|
||||
$this->categories->attach($category);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Category $categoryToRemove
|
||||
*/
|
||||
public function removeCategory(Category $categoryToRemove): void
|
||||
{
|
||||
$this->categories->detach($categoryToRemove);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ObjectStorage<Category>
|
||||
*/
|
||||
public function getCategories(): ObjectStorage
|
||||
{
|
||||
return $this->categories;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ObjectStorage<Category> $categories
|
||||
*/
|
||||
public function setCategories(ObjectStorage $categories): void
|
||||
{
|
||||
$this->categories = $categories;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user