You are here

function auto_entitylabel_eval in Automatic Entity Label 7

Evaluates php code and passes $entity and $language to it.

1 call to auto_entitylabel_eval()
_auto_entitylabel_patternprocessor in ./auto_entitylabel.module
Helper function to generate the title according to the settings.

File

./auto_entitylabel.module, line 456
Allows hiding of entity label fields and automatic label creation.

Code

function auto_entitylabel_eval($code, $entity, $language = LANGUAGE_NONE) {
  ob_start();

  // @codingStandardsIgnoreLine
  print eval('?>' . $code);
  $output = ob_get_contents();
  ob_end_clean();
  return $output;
}