Commit 75a1e678 authored by Dirk Wildt's avatar Dirk Wildt

0.9.2

parent 9d9d0548
0.9.2
19-07-16
Improvement
* #i0005: BookingController
* #i0005: BookingController, CellClassViewHelper
0.9.1
19-07-13
......
......@@ -58,21 +58,21 @@ class BookingController extends AbstractFrontendController
* _cellIntoTheCaddy
*
* @return integer pid
* @version 0.0.8
* @version 0.9.2
* @since 0.0.8
* @internal #t3869
*/
private function _getCaddyPid()
{
$caddyUid = $this->_getFlexformCaddy();
if( empty( $caddyUid ) )
$content = $this->_getContentCaddy( $caddyUid );
if( empty( $content ) )
{
$this->addFlashMessage( 'Die Anwendung ist mit keinem Warenkorb verbunden.', '', \TYPO3\CMS\Core\Messaging\AbstractMessage::ERROR );
$this->addFlashMessage( 'Aktualisiere bitte das Plugin.', '', \TYPO3\CMS\Core\Messaging\AbstractMessage::INFO );
$this->addFlashMessage( 'Die Anwendung ist mit keinem gültigen Warenkorb verbunden.', '', \TYPO3\CMS\Core\Messaging\AbstractMessage::ERROR );
$this->addFlashMessage( 'Prüfe bitte den Warenkorb des Plugins.', '', \TYPO3\CMS\Core\Messaging\AbstractMessage::INFO );
return false;
}
$ttContent = $this->_getContentCaddy( $caddyUid );
return $ttContent->getPid();
return $content->getPid();
}
/**
......@@ -181,16 +181,18 @@ class BookingController extends AbstractFrontendController
$area = $this->areaRepository->findByUid( $areaUid );
return $area;
}
$prompt = ''
. '<h1>'
. 'ERROR: site plan is missing'
. '</h1>'
. 'Current flexform isn\'t linked with an area (site plan).<br />'
. 'Please take care of a proper configuration.<br />'
. '<br />'
. 'Error occurs @ ' . __METHOD__ . ' (#' . __LINE__ . ')'
;
die( $prompt );
$this->addFlashMessage( 'Die Anwendung ist mit keinem gültigen Plan verbunden.', '', \TYPO3\CMS\Core\Messaging\AbstractMessage::ERROR );
$this->addFlashMessage( 'Prüfe bitte das Plugin.', '', \TYPO3\CMS\Core\Messaging\AbstractMessage::INFO );
// $prompt = ''
// . '<h1>'
// . 'ERROR: site plan is missing'
// . '</h1>'
// . 'Current flexform isn\'t linked with an area (site plan).<br />'
// . 'Please take care of a proper configuration.<br />'
// . '<br />'
// . 'Error occurs @ ' . __METHOD__ . ' (#' . __LINE__ . ')'
// ;
// die( $prompt );
}
/**
......@@ -217,16 +219,18 @@ class BookingController extends AbstractFrontendController
{
return $caddyUid;
}
$prompt = ''
. '<h1>'
. 'ERROR: caddy is missing'
. '</h1>'
. 'Current flexform isn\'t linked with a Caddy.<br />'
. 'Please take care of a proper configuration.<br />'
. '<br />'
. 'Error occurs @ ' . __METHOD__ . ' (#' . __LINE__ . ')'
;
die( $prompt );
$this->addFlashMessage( 'Die Anwendung ist mit keinem Warenkorb verbunden.', '', \TYPO3\CMS\Core\Messaging\AbstractMessage::ERROR );
$this->addFlashMessage( 'Prüfe bitte das Plugin.', '', \TYPO3\CMS\Core\Messaging\AbstractMessage::INFO );
// $prompt = ''
// . '<h1>'
// . 'ERROR: caddy is missing'
// . '</h1>'
// . 'Current flexform isn\'t linked with a Caddy.<br />'
// . 'Please take care of a proper configuration.<br />'
// . '<br />'
// . 'Error occurs @ ' . __METHOD__ . ' (#' . __LINE__ . ')'
// ;
// die( $prompt );
}
/**
......@@ -305,23 +309,32 @@ class BookingController extends AbstractFrontendController
*/
public function listAction()
{
$area = $this->_getFlexformArea();
$this->view->assignMultiple(
array(
'area' => $area
, 'caddyPid' => $this->_getCaddyPid()
'caddyPid' => $this->_getCaddyPid()
, 'cData' => $this->contentObject->data
, 'cells' => $this->_getAreaCells( $area )
, 'formCellWiBgimageChecked' => $this->_oSessionUtility->getSessionElement( 'formCellWiBgimage', true )
, 'formCellWiCategoriesChecked' => $this->_oSessionUtility->getSessionElement( 'formCellWiCategories', true )
, 'formCellWiGroupsChecked' => $this->_oSessionUtility->getSessionElement( 'formCellWiGroups', true )
, 'formCellWiTicketsChecked' => $this->_oSessionUtility->getSessionElement( 'formCellWiTickets', true )
, 'formCellWiUndefinedCellsChecked' => $this->_oSessionUtility->getSessionElement( 'formCellWiUndefinedCells', true )
, 'grid-template-columns' => AreaModuleUtility::getAutoElementsForGridCSS( $area )
, 'size' => $this->_getFlexformCellsize()
)
);
$area = $this->_getFlexformArea();
if( empty( $area ) )
{
return;
}
$this->view->assignMultiple(
array(
'area' => $area
, 'cells' => $this->_getAreaCells( $area )
, 'grid-template-columns' => AreaModuleUtility::getAutoElementsForGridCSS( $area )
)
);
}
}
......@@ -327,7 +327,7 @@ class CellClassViewHelper extends AbstractFlexformViewHelper
{
static $uids = null;
if( !empty( $uids ) )
if( $uids !== null )
{
return $uids;
}
......@@ -339,14 +339,18 @@ class CellClassViewHelper extends AbstractFlexformViewHelper
if( empty( $caddyUid ) )
{
$this->addFlashMessage( 'Die Anwendung ist mit keinem Warenkorb verbunden.', '', \TYPO3\CMS\Core\Messaging\AbstractMessage::ERROR );
$this->addFlashMessage( 'Aktualisiere bitte das Plugin.', '', \TYPO3\CMS\Core\Messaging\AbstractMessage::INFO );
return false;
$uids = false;
return $uid;
}
$contentRepository = ObjectUtility::getObjectManager()->get( ContentRepository::class );
$content = $contentRepository->findByUid( $caddyUid );
if( empty( $content ) )
{
$uids = false;
return $uid;
}
$caddyPid = $content->getPid();
//var_dump( __METHOD__, __LINE__,$caddyUid, $caddyPid );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment