Initial commit
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace Internetfabrik\IfOberstufenplaner\ViewHelpers;
|
||||
|
||||
|
||||
class DispViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper {
|
||||
/**
|
||||
* @param $obj object Object
|
||||
* @param $prop string Property
|
||||
* @return mixed
|
||||
*/
|
||||
public function render($obj,$prop) {
|
||||
if (is_object($obj)) {
|
||||
return $obj->$prop;
|
||||
} elseif (is_array($obj)) {
|
||||
if (array_key_exists($prop, $obj)) {
|
||||
return $obj[$prop];
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user