postProcessBackendLayout() public method

Postprocesses a selected backend layout
public postProcessBackendLayout ( integer &$pageUid, array &$backendLayout ) : null | void
$pageUid integer Starting page UID in the rootline (this current page)
$backendLayout array The backend layout which was detected from page id
return null | void
 /**
  * Gets the selected backend layout
  *
  * @param integer $id
  * @return array|NULL $backendLayout
  */
 public function getSelectedBackendLayout($id)
 {
     $this->backendLayout->preProcessBackendLayoutPageUid($id);
     $backendLayout = parent::getSelectedBackendLayout($id);
     $this->backendLayout->postProcessBackendLayout($id, $backendLayout);
     return array('__config' => $backendLayout['__config'], '__items' => $backendLayout['__items'], '__colPosList' => $backendLayout['__colPosList']);
 }
 /**
  * Get backend layout configuration
  *
  * @return array
  */
 public function getBackendLayoutConfiguration()
 {
     $backendLayoutUid = $this->getSelectedBackendLayoutUid($this->id);
     if (!$backendLayoutUid) {
         $config = array();
         $this->backendLayout->postProcessBackendLayout($this->id, $config);
         $typoScriptArray = $config['__config'];
         $typoScriptArray['colCount'] = $config['__config']['backend_layout.']['colCount'];
         $typoScriptArray['rowCount'] = $config['__config']['backend_layout.']['rowCount'];
         $typoScriptArray['rows.'] = $config['__config']['backend_layout.']['rows.'];
         unset($typoScriptArray['backend_layout.']);
         $config['config'] = $this->compactTypoScriptArray(array('backend_layout.' => $typoScriptArray));
         return $config;
     }
     return \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('backend_layout', intval($backendLayoutUid));
 }
 /**
  * @dataProvider getPostProcessBackendLayoutTestValues
  * @param Provider $provider
  * @param mixed $record
  * @param string $messageFunction
  * @param integer $messageCount
  * @param array $expected
  */
 public function testPostProcessBackendLayout(Provider $provider, $record, $messageFunction, $messageCount, array $expected)
 {
     $GLOBALS['LANG'] = $this->getMock('TYPO3\\CMS\\Lang\\LanguageService', array('sL'));
     $GLOBALS['LANG']->expects($this->any())->method('sL')->willReturn('translatedlabel');
     $instance = new BackendLayout();
     $pageUid = 1;
     $backendLayout = array();
     $configurationService = $this->getMock('FluidTYPO3\\Fluidpages\\Service\\ConfigurationService', array('resolvePrimaryConfigurationProvider', 'debug', 'message'));
     $configurationService->expects($this->exactly($messageCount))->method($messageFunction);
     if (NULL !== $record) {
         $configurationService->expects($this->once())->method('resolvePrimaryConfigurationProvider')->with('pages', 'tx_fed_page_flexform', $record)->willReturn($provider);
     }
     $recordService = $this->getMock('FluidTYPO3\\Flux\\Service\\WorkspacesAwareRecordService', array('getSingle'));
     $recordService->expects($this->once())->method('getSingle')->willReturn($record);
     $instance->injectConfigurationService($configurationService);
     $instance->injectWorkspacesAwareRecordService($recordService);
     $instance->postProcessBackendLayout($pageUid, $backendLayout);
     $this->assertEquals($expected, $backendLayout);
 }
 /**
  * @dataProvider getPostProcessBackendLayoutTestValues
  * @param Provider $provider
  * @param mixed $record
  * @param string $messageFunction
  * @param integer $messageCount
  * @param array $expected
  */
 public function testPostProcessBackendLayout(Provider $provider, $record, $messageFunction, $messageCount, array $expected)
 {
     $instance = new BackendLayout();
     $pageUid = 1;
     $backendLayout = array();
     /** @var ConfigurationService|\PHPUnit_Framework_MockObject_MockObject $configurationService */
     $configurationService = $this->getMock('FluidTYPO3\\Fluidpages\\Service\\ConfigurationService', array('resolvePrimaryConfigurationProvider', 'debug', 'message'));
     $configurationService->expects($this->exactly($messageCount))->method($messageFunction);
     if (null !== $record) {
         $configurationService->expects($this->once())->method('resolvePrimaryConfigurationProvider')->with('pages', 'tx_fed_page_flexform', $record)->willReturn($provider);
     }
     /** @var WorkspacesAwareRecordService|\PHPUnit_Framework_MockObject_MockObject $recordService */
     $recordService = $this->getMock('FluidTYPO3\\Flux\\Service\\WorkspacesAwareRecordService', array('getSingle'));
     $recordService->expects($this->once())->method('getSingle')->willReturn($record);
     $instance->injectConfigurationService($configurationService);
     $instance->injectWorkspacesAwareRecordService($recordService);
     $instance->postProcessBackendLayout($pageUid, $backendLayout);
     $this->assertEquals($expected, $backendLayout);
 }