Files
VITEC-website/packages/vitec/Classes/Domain/Model/Usecase.php
Oliver Rasche 12eb40614b Unify list plugins, add solution list and per-story detail page
- vitec_usecaselist: layout + record selection like marketlist
- new plugin vitec_solutionlist (spec 7.13.3, key "solutions")
- tx_vitec_domain_model_usecase: detail_page -> resolved detailUrl
  (also gives story cards in vitec_modelcard a link for the first time)
- "Show Toolbar" checkbox on product/market/solution/usecase lists
- spec bumped to v1.9

BREAKING: vitec_productlist and vitec_usecaselist now emit an object
instead of a bare array. Consumers must read products.products and
usecases.usecases. Also found: productlist had a configurable layout
that was never serialised; it is emitted now, but keeps its own 0-3
vocabulary instead of grid/list/carousel.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-17 16:29:06 +02:00

353 lines
6.6 KiB
PHP

<?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 Usecase extends AbstractEntity
{
/**
* @var string
*/
protected $title = '';
/**
* @var string
*/
protected $slug = '';
/**
* Page that presents this story. 0 = none; the list plugin then falls back
* to its own "Single PID" detail page plus the slug.
*
* @var int
*/
protected $detailPage = 0;
/**
* subtitle
*
* @var string
*/
protected $subtitle = '';
/**
* teaser
*
* @var string
*/
protected $teaser = '';
/**
* hideonapp
*
* @var bool
*/
protected $hideonapp = false;
/**
* hideonwebsite
*
* @var bool
*/
protected $hideonwebsite = false;
/**
* description
*
* @var string
*/
protected $description = '';
/**
* @var string
*/
protected $singlepid = '';
/**
* caseimage
*
* @var \TYPO3\CMS\Extbase\Domain\Model\FileReference
* @TYPO3\CMS\Extbase\Annotation\ORM\Cascade
*/
protected $caseimage = '';
/**
* logoimage
*
* @var \TYPO3\CMS\Extbase\Domain\Model\FileReference
* @TYPO3\CMS\Extbase\Annotation\ORM\Cascade
*/
protected $logoimage = null;
/**
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\Category>
* @TYPO3\CMS\Extbase\Annotation\ORM\Cascade("remove")
*/
protected $categories;
/* ---------------------------------------------- */
/* 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 getSlug(): string
{
return $this->slug;
}
public function getDetailPage(): int
{
return $this->detailPage;
}
public function setDetailPage(int $detailPage): void
{
$this->detailPage = $detailPage;
}
/**
* @param string $slug
*/
public function setSlug(string $slug): void
{
$this->slug = $slug;
}
/**
* @return string
*/
public function getSinglepid(): string
{
return $this->singlepid;
}
/**
* @param string $singlepid
*/
public function setSinglepid(string $singlepid): void
{
$this->singlepid = $singlepid;
}
/**
* Returns the teaser
*
* @return string $kteasereywords
*/
public function getTeaser()
{
return $this->teaser;
}
/**
* Sets the teaser
*
* @param string $teaser
* @return void
*/
public function setTeaser($teaser)
{
$this->teaser = $teaser;
}
/**
* Returns the subtitle
*
* @return string $subtitle
*/
public function getSubtitle()
{
return $this->subtitle;
}
/**
* Sets the subtitle
*
* @param string $subtitle
* @return void
*/
public function setSubtitle($subtitle)
{
$this->subtitle = $subtitle;
}
/**
* Returns the hideonapp
*
* @return bool $hideonapp
*/
public function getHideonapp()
{
return $this->hideonapp;
}
/**
* Sets the hideonapp
*
* @param bool $hideonapp
* @return void
*/
public function setHideonapp($hideonapp)
{
$this->hideonapp = $hideonapp;
}
/**
* Returns the hideonwebsite
*
* @return bool $hideonwebsite
*/
public function getHideonwebsite()
{
return $this->hideonwebsite;
}
/**
* Sets the hideonwebsite
*
* @param bool $hideonwebsite
* @return void
*/
public function setHideonwebsite($hideonwebsite)
{
$this->hideonwebsite = $hideonwebsite;
}
/**
* Returns the description
*
* @return string $description
*/
public function getDescription()
{
return $this->description;
}
/**
* Sets the description
*
* @param string $description
* @return void
*/
public function setDescription($description)
{
$this->description = $description;
}
/**
* Returns the caseimage
*
* @return \TYPO3\CMS\Extbase\Domain\Model\FileReference $caseimage
*/
public function getCaseimage()
{
return $this->caseimage;
}
/**
* Sets the caseimage
*
* @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $caseimage
* @return void
*/
public function setCaseimage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $caseimage)
{
$this->caseimage = $caseimage;
}
/**
* Returns the logoimage
*
* @return \TYPO3\CMS\Extbase\Domain\Model\FileReference $logoimage
*/
public function getLogoimage()
{
return $this->logoimage;
}
/**
* Sets the logoimage
*
* @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $logoimage
* @return void
*/
public function setLogoimage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $logoimage)
{
$this->logoimage = $logoimage;
}
/**
* Initializes the ObjectStorage for categories
*/
public function __construct()
{
$this->categories = new ObjectStorage();
$this->productimage = new ObjectStorage();
$this->downloads = new ObjectStorage();
}
/**
* Adds a category
*
* @param Category $category
* @return void
*/
public function addCategory(Category $category)
{
$this->categories->attach($category);
}
/**
* Removes a category
*
* @param Category $categoryToRemove
* @return void
*/
public function removeCategory(Category $categoryToRemove)
{
$this->categories->detach($categoryToRemove);
}
/**
* Returns the categories
*
* @return ObjectStorage<Category>
*/
public function getCategories()
{
return $this->categories;
}
/**
* Sets the categories
*
* @param ObjectStorage<Category> $categories
* @return void
*/
public function setCategories(ObjectStorage $categories)
{
$this->categories = $categories;
}
}