code: public function adjustDcaByType($dc)
  	{
  		$objCte = Contao\ContentModel::findByPk($dc->id);
  
  		if ($objCte === null)
  		{
  			return;
  		}
  
  		switch ($objCte->type)
  		{
  			case 'hyperlink':
  				unset($GLOBALS['TL_DCA']['tl_content']['fields']['imageUrl']);
  				break;
  
  			case 'image':
  				$GLOBALS['TL_DCA']['tl_content']['fields']['imagemargin']['eval']['tl_class'] .= ' clr';
  				break;
  		}
  	}
docs: Adjust the DCA by type
  
  @param object