Commit 7e2e5382 authored by Siddharth Sheth's avatar Siddharth Sheth
Browse files

[fix pipline issue in Ext:t3o_mom]

parent cc27cf89
Pipeline #6836 failed with stages
in 12 seconds
......@@ -16,52 +16,55 @@ namespace T3o\T3oMom\Controller;
/**
* T3MomController
*/
class T3MomController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController {
/**
* t3MomRepository
*
* @var \T3o\T3oMom\Domain\Repository\T3MomRepository
* @inject
*/
protected $t3MomRepository = null;
class T3MomController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController
{
/**
* t3MomRepository
*
* @var \T3o\T3oMom\Domain\Repository\T3MomRepository
* @inject
*/
protected $t3MomRepository = null;
/**
* t3teamsRepository
*
* @var \T3o\T3oJobs\Domain\Repository\T3teamsRepository
* @inject
*/
protected $t3teamsRepository = null;
/**
* t3teamsRepository
*
* @var \T3o\T3oJobs\Domain\Repository\T3teamsRepository
* @inject
*/
protected $t3teamsRepository = null;
/**
* action list
* @param array $result
*/
public function listAction($result = null) {
$this->view->assign('isDefaultListing', 'Yes');
/**
* action list
* @param array $result
*/
public function listAction($result = null)
{
$this->view->assign('isDefaultListing', 'Yes');
// Is it calling team filter?
if (!is_null($result['teamid']) && $result['teamid'] >= 0) {
$selTeam = $this->t3teamsRepository->findByUid($result['teamid']);
$t3Moms = $this->t3MomRepository->filterByTeam($selTeam);
$this->view->assign('t3Moms', $t3Moms);
$this->view->assign('isDefaultListing', 'No');
}
// Let's just display default listing screen
else {
$allTeam = $this->t3teamsRepository->findAll();
$t3Moms = $this->t3MomRepository->findAll();
$this->view->assign('t3Moms', $t3Moms);
$this->view->assign('allTeam', $allTeam);
}
}
// Is it calling team filter?
if (!is_null($result['teamid']) && $result['teamid'] >= 0) {
$selTeam = $this->t3teamsRepository->findByUid($result['teamid']);
$t3Moms = $this->t3MomRepository->filterByTeam($selTeam);
$this->view->assign('t3Moms', $t3Moms);
$this->view->assign('isDefaultListing', 'No');
}
// Let's just display default listing screen
else {
$allTeam = $this->t3teamsRepository->findAll();
$t3Moms = $this->t3MomRepository->findAll();
$this->view->assign('t3Moms', $t3Moms);
$this->view->assign('allTeam', $allTeam);
}
}
/**
* action show
*
* @param \T3o\T3oMom\Domain\Model\T3Mom $t3Mom
*/
public function showAction(\T3o\T3oMom\Domain\Model\T3Mom $t3Mom) {
$this->view->assign('t3Mom', $t3Mom);
}
/**
* action show
*
* @param \T3o\T3oMom\Domain\Model\T3Mom $t3Mom
*/
public function showAction(\T3o\T3oMom\Domain\Model\T3Mom $t3Mom)
{
$this->view->assign('t3Mom', $t3Mom);
}
}
......@@ -15,174 +15,189 @@ namespace T3o\T3oMom\Domain\Model;
/**
* T3Mom
*/
class T3Mom extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
/**
* title
*
* @var string
*/
protected $title = '';
/**
* momdate
*
* @var \DateTime
*/
protected $momdate = null;
/**
* text
*
* @var string
*/
protected $text = '';
/**
* momauthor
*
* @var string
*/
protected $momauthor = '';
/**
* t3teams
*
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\T3o\T3oJobs\Domain\Model\T3teams>
*/
protected $t3teams = null;
/**
* __construct
*/
public function __construct() {
//Do not remove the next line: It would break the functionality
$this->initStorageObjects();
}
/**
* Initializes all ObjectStorage properties
* Do not modify this method!
* It will be rewritten on each save in the extension builder
* You may modify the constructor of this class instead
*
* @return void
*/
protected function initStorageObjects() {
$this->t3teams = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
}
/**
* Returns the title
*
* @return string $title
*/
public function getTitle() {
return $this->title;
}
/**
* Sets the title
*
* @param string $title
* @return void
*/
public function setTitle($title) {
$this->title = $title;
}
/**
* Returns the momdate
*
* @return \DateTime $momdate
*/
public function getMomdate() {
return $this->momdate;
}
/**
* Sets the momdate
*
* @param \DateTime $momdate
* @return void
*/
public function setMomdate(\DateTime $momdate) {
$this->momdate = $momdate;
}
/**
* Returns the text
*
* @return string $text
*/
public function getText() {
return $this->text;
}
/**
* Sets the text
*
* @param string $text
* @return void
*/
public function setText($text) {
$this->text = $text;
}
/**
* Returns the momauthor
*
* @return string $momauthor
*/
public function getMomauthor() {
return $this->momauthor;
}
/**
* Sets the momauthor
*
* @param string $momauthor
* @return void
*/
public function setMomauthor($momauthor) {
$this->momauthor = $momauthor;
}
/**
* Adds a T3teams
*
* @param \T3o\T3oJobs\Domain\Model\T3teams $t3team
* @return void
*/
public function addT3team(\T3o\T3oJobs\Domain\Model\T3teams $t3team) {
$this->t3teams->attach($t3team);
}
/**
* Removes a T3teams
*
* @param \T3o\T3oJobs\Domain\Model\T3teams $t3teamToRemove The T3teams to be removed
* @return void
*/
public function removeT3team(\T3o\T3oJobs\Domain\Model\T3teams $t3teamToRemove) {
$this->t3teams->detach($t3teamToRemove);
}
/**
* Returns the t3teams
*
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\T3o\T3oJobs\Domain\Model\T3teams> $t3teams
*/
public function getT3teams() {
return $this->t3teams;
}
/**
* Sets the t3teams
*
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\T3o\T3oJobs\Domain\Model\T3teams> $t3teams
* @return void
*/
public function setT3teams(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $t3teams) {
$this->t3teams = $t3teams;
}
class T3Mom extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
{
/**
* title
*
* @var string
*/
protected $title = '';
/**
* momdate
*
* @var \DateTime
*/
protected $momdate = null;
/**
* text
*
* @var string
*/
protected $text = '';
/**
* momauthor
*
* @var string
*/
protected $momauthor = '';
/**
* t3teams
*
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\T3o\T3oJobs\Domain\Model\T3teams>
*/
protected $t3teams = null;
/**
* __construct
*/
public function __construct()
{
//Do not remove the next line: It would break the functionality
$this->initStorageObjects();
}
/**
* Initializes all ObjectStorage properties
* Do not modify this method!
* It will be rewritten on each save in the extension builder
* You may modify the constructor of this class instead
*
* @return void
*/
protected function initStorageObjects()
{
$this->t3teams = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
}
/**
* Returns the title
*
* @return string $title
*/
public function getTitle()
{
return $this->title;
}
/**
* Sets the title
*
* @param string $title
* @return void
*/
public function setTitle($title)
{
$this->title = $title;
}
/**
* Returns the momdate
*
* @return \DateTime $momdate
*/
public function getMomdate()
{
return $this->momdate;
}
/**
* Sets the momdate
*
* @param \DateTime $momdate
* @return void
*/
public function setMomdate(\DateTime $momdate)
{
$this->momdate = $momdate;
}
/**
* Returns the text
*
* @return string $text
*/
public function getText()
{
return $this->text;
}
/**
* Sets the text
*
* @param string $text
* @return void
*/
public function setText($text)
{
$this->text = $text;
}
/**
* Returns the momauthor
*
* @return string $momauthor
*/
public function getMomauthor()
{
return $this->momauthor;
}
/**
* Sets the momauthor
*
* @param string $momauthor
* @return void
*/
public function setMomauthor($momauthor)
{
$this->momauthor = $momauthor;
}
/**
* Adds a T3teams
*
* @param \T3o\T3oJobs\Domain\Model\T3teams $t3team
* @return void
*/
public function addT3team(\T3o\T3oJobs\Domain\Model\T3teams $t3team)
{
$this->t3teams->attach($t3team);
}
/**
* Removes a T3teams
*
* @param \T3o\T3oJobs\Domain\Model\T3teams $t3teamToRemove The T3teams to be removed
* @return void
*/
public function removeT3team(\T3o\T3oJobs\Domain\Model\T3teams $t3teamToRemove)
{
$this->t3teams->detach($t3teamToRemove);
}
/**
* Returns the t3teams
*
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\T3o\T3oJobs\Domain\Model\T3teams> $t3teams
*/
public function getT3teams()
{
return $this->t3teams;
}
/**
* Sets the t3teams
*
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\T3o\T3oJobs\Domain\Model\T3teams> $t3teams
* @return void
*/
public function setT3teams(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $t3teams)
{
$this->t3teams = $t3teams;
}
}
......@@ -15,27 +15,29 @@ namespace T3o\T3oMom\Domain\Repository;
/**
* The repository for T3Moms
*/
class T3MomRepository extends \TYPO3\CMS\Extbase\Persistence\Repository {
public function filterByTeam($team = null) {
$main = [];
$query = $this->createQuery();
if ($team == 0) {
} else {
$main[] = $query->contains('t3teams', $team);
$query->matching(
$query->logicalAnd(
$main
)
);
}
$result = $query->execute();
//debug::var_dump($result);die;
return $result;
}
class T3MomRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
{
public function filterByTeam($team = null)
{
$main = [];
$query = $this->createQuery();
if ($team == 0) {
} else {
$main[] = $query->contains('t3teams', $team);
$query->matching(
$query->logicalAnd(
$main
)
);
}
$result = $query->execute();
//debug::var_dump($result);die;
return $result;
}
}
......@@ -17,7 +17,7 @@ return [
'endtime' => 'endtime',
],
'searchFields' => 'title,momdate,text,momauthor, t3teams',
'iconfile' => 'EXT:t3o_mom/Resources/Public/Icons/tx_t3omom_domain_model_t3mom.gif'
'iconfile' => 'EXT:t3o_mom/Resources/Public/Icons/tx_t3omom_domain_model_t3mom.gif',
],
'interface' => [
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, title,t3teams, momdate, text, momauthor',
......@@ -37,8 +37,8 @@ return [
[
'LLL:EXT:lang/locallang_general.xlf:LGL.allLanguages',
-1,
'flags-multiple'
]
'flags-multiple',
],
],
'default' => 0,
],
......@@ -78,15 +78,15 @@ return [
'type' => 'check',
'items' => [
'1' => [
'0' => 'LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.enabled'
]
'0' => 'LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.enabled',
],
],
],
],
'starttime' => [
'exclude' => true,
'behaviour' => [
'allowLanguageSynchronization' => true
'allowLanguageSynchronization' => true,
],
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.starttime',
'config' => [
......@@ -100,7 +100,7 @@ return [
'endtime' => [
'exclude' => true,
'behaviour' => [
'allowLanguageSynchronization' => true
'allowLanguageSynchronization' => true,
],
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.endtime',
'config' => [
......@@ -110,7 +110,7 @@ return [
'eval' => 'datetime',
'default' => 0,
'range' => [
'upper' => mktime(0, 0, 0, 1, 1, 2038)
'upper' => mktime(0, 0, 0, 1, 1, 2038),
],
],
],
......@@ -121,7 +121,7 @@ return [
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim,required'
'eval' => 'trim,required',
],
],
't3teams' => [
......@@ -147,9 +147,9 @@ return [
'listModule' => [
'disabled' => true,
],
],
],
],
],
'momdate' => [
'exclude' => true,
......@@ -179,7 +179,7 @@ return [
'rows' => 15,
'eval' => 'trim',
],
],
'momauthor' => [
'exclude' => true,
......@@ -187,9 +187,9 @@ return [
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
'eval' => 'trim',
],
],