public function showJsLibraryHint($dc)
	{
		if ($_POST || Contao\Input::get('act') != 'edit')
		{
			return;
		}

		// Return if the user cannot access the layout module (see #6190)
		if (!$this->User->hasAccess('themes', 'modules') || !$this->User->hasAccess('layout', 'themes'))
		{
			return;
		}

		$objCte = Contao\ContentModel::findByPk($dc->id);

		if ($objCte === null)
		{
			return;
		}

		switch ($objCte->type)
		{
			case 'code':
				Contao\Message::addInfo(sprintf($GLOBALS['TL_LANG']['tl_content']['includeTemplate'], 'js_highlight'));
				break;

			case 'gallery':
				Contao\Message::addInfo(sprintf($GLOBALS['TL_LANG']['tl_content']['includeTemplates'], 'moo_mediabox', 'j_colorbox'));
				break;

			case 'sliderStart':
			case 'sliderStop':
				Contao\Message::addInfo(sprintf($GLOBALS['TL_LANG']['tl_content']['includeTemplate'], 'js_slider'));
				break;

			case 'accordionSingle':
			case 'accordionStart':
			case 'accordionStop':
				Contao\Message::addInfo(sprintf($GLOBALS['TL_LANG']['tl_content']['includeTemplates'], 'moo_accordion', 'j_accordion'));
				break;

			case 'table':
				if ($objCte->sortable)
				{
					Contao\Message::addInfo(sprintf($GLOBALS['TL_LANG']['tl_content']['includeTemplates'], 'moo_tablesort', 'j_tablesort'));
				}
				break;
		}
	}
public function showJsLibraryHint($dc)
	{
		if ($_POST || Contao\Input::get('act') != 'edit')
		{
			return;
		}

		
		if (!$this->User->hasAccess('themes', 'modules') || !$this->User->hasAccess('layout', 'themes'))
		{
			return;
		}

		$objCte = Contao\ContentModel::findByPk($dc->id);

		if ($objCte === null)
		{
			return;
		}

		switch ($objCte->type)
		{
			case 'code':
				Contao\Message::addInfo(sprintf($GLOBALS['TL_LANG']['tl_content']['includeTemplate'], 'js_highlight'));
				break;

			case 'gallery':
				Contao\Message::addInfo(sprintf($GLOBALS['TL_LANG']['tl_content']['includeTemplates'], 'moo_mediabox', 'j_colorbox'));
				break;

			case 'sliderStart':
			case 'sliderStop':
				Contao\Message::addInfo(sprintf($GLOBALS['TL_LANG']['tl_content']['includeTemplate'], 'js_slider'));
				break;

			case 'accordionSingle':
			case 'accordionStart':
			case 'accordionStop':
				Contao\Message::addInfo(sprintf($GLOBALS['TL_LANG']['tl_content']['includeTemplates'], 'moo_accordion', 'j_accordion'));
				break;

			case 'table':
				if ($objCte->sortable)
				{
					Contao\Message::addInfo(sprintf($GLOBALS['TL_LANG']['tl_content']['includeTemplates'], 'moo_tablesort', 'j_tablesort'));
				}
				break;
		}
	}
public function showJsLibraryHint ( $ dc ) { if ( $ _POST || Contao \ Input :: get ( 'act' ) != 'edit' ) { return ; } // Return if the user cannot access the layout module (see #6190) if ( ! $ this -> User -> hasAccess ( 'themes' , 'modules' ) || ! $ this -> User -> hasAccess ( 'layout' , 'themes' ) ) { return ; } $ objCte = Contao \ ContentModel :: findByPk ( $ dc -> id ) ; if ( $ objCte === null ) { return ; } switch ( $ objCte -> type ) { case 'code' : Contao \ Message :: addInfo ( sprintf ( $ GLOBALS [ 'TL_LANG' ] [ 'tl_content' ] [ 'includeTemplate' ] , 'js_highlight' ) ) ; break ; case 'gallery' : Contao \ Message :: addInfo ( sprintf ( $ GLOBALS [ 'TL_LANG' ] [ 'tl_content' ] [ 'includeTemplates' ] , 'moo_mediabox' , 'j_colorbox' ) ) ; break ; case 'sliderStart' : case 'sliderStop' : Contao \ Message :: addInfo ( sprintf ( $ GLOBALS [ 'TL_LANG' ] [ 'tl_content' ] [ 'includeTemplate' ] , 'js_slider' ) ) ; break ; case 'accordionSingle' : case 'accordionStart' : case 'accordionStop' : Contao \ Message :: addInfo ( sprintf ( $ GLOBALS [ 'TL_LANG' ] [ 'tl_content' ] [ 'includeTemplates' ] , 'moo_accordion' , 'j_accordion' ) ) ; break ; case 'table' : if ( $ objCte -> sortable ) { Contao \ Message :: addInfo ( sprintf ( $ GLOBALS [ 'TL_LANG' ] [ 'tl_content' ] [ 'includeTemplates' ] , 'moo_tablesort' , 'j_tablesort' ) ) ; } break ; } }
Show a hint if a JavaScript library needs to be included in the page layout

@param object
Show a hint if a JavaScript library needs to be included in the page layout