protected function loadNodeMainData(Localization $localization)
	{
		$localeId = $this->getCurrentLocale()
				->getId();
		
		$isCurrentLocaleLocalization = ($localization->getLocaleId() === $localeId);

		$page = $localization->getMaster();

		$nodeData = array(
			'id'			=> $isCurrentLocaleLocalization ? $localization->getId() : $page->getId(),
			'master_id'		=> $page->getId(),

			'type'			=> $page::DISCRIMINATOR,
			
			'title'			=> $localization->getTitle(),

			'global'		=> $page->isGlobal(),
			'localized'		=> $isCurrentLocaleLocalization,

			'editable'		=> $isCurrentLocaleLocalization,
			'isDraggable'	=> $isCurrentLocaleLocalization,
			'isDropTarget'	=> true,

			// @TODO: previews
			'preview' => null,

			'droppablePlaces' => array(
				'before'	=> true,
				'after'		=> true,
				'inside'	=> $isCurrentLocaleLocalization,
			),

			// @FIXME: icon
			'icon' => null,
		);

		if ($localization instanceof PageLocalization) {
			$nodeData = array_merge($nodeData, $this->getPageLocalizationData($localization));
		}

		return $nodeData;
	}
protected function loadNodeMainData(Localization $localization)
	{
		$localeId = $this->getCurrentLocale()
				->getId();
		
		$isCurrentLocaleLocalization = ($localization->getLocaleId() === $localeId);

		$page = $localization->getMaster();

		$nodeData = array(
			'id'			=> $isCurrentLocaleLocalization ? $localization->getId() : $page->getId(),
			'master_id'		=> $page->getId(),

			'type'			=> $page::DISCRIMINATOR,
			
			'title'			=> $localization->getTitle(),

			'global'		=> $page->isGlobal(),
			'localized'		=> $isCurrentLocaleLocalization,

			'editable'		=> $isCurrentLocaleLocalization,
			'isDraggable'	=> $isCurrentLocaleLocalization,
			'isDropTarget'	=> true,

			// @TODO: previews
			'preview' => null,

			'droppablePlaces' => array(
				'before'	=> true,
				'after'		=> true,
				'inside'	=> $isCurrentLocaleLocalization,
			),

			// @FIXME: icon
			'icon' => null,
		);

		if ($localization instanceof PageLocalization) {
			$nodeData = array_merge($nodeData, $this->getPageLocalizationData($localization));
		}

		return $nodeData;
	}
protected function loadNodeMainData ( Localization $ localization ) { $ localeId = $ this -> getCurrentLocale ( ) -> getId ( ) ; $ isCurrentLocaleLocalization = ( $ localization -> getLocaleId ( ) === $ localeId ) ; $ page = $ localization -> getMaster ( ) ; $ nodeData = array ( 'id' => $ isCurrentLocaleLocalization ? $ localization -> getId ( ) : $ page -> getId ( ) , 'master_id' => $ page -> getId ( ) , 'type' => $ page :: DISCRIMINATOR , 'title' => $ localization -> getTitle ( ) , 'global' => $ page -> isGlobal ( ) , 'localized' => $ isCurrentLocaleLocalization , 'editable' => $ isCurrentLocaleLocalization , 'isDraggable' => $ isCurrentLocaleLocalization , 'isDropTarget' => true , // @TODO: previews 'preview' => null , 'droppablePlaces' => array ( 'before' => true , 'after' => true , 'inside' => $ isCurrentLocaleLocalization , ) , // @FIXME: icon 'icon' => null , ) ; if ( $ localization instanceof PageLocalization ) { $ nodeData = array_merge ( $ nodeData , $ this -> getPageLocalizationData ( $ localization ) ) ; } return $ nodeData ; }
Loads main node data array

@param Localization $localization
@return array
Loads main node data array