extbase - Repository/controller: How can I force TYPO3 to load the field "sorting"? -
in controller/template i'd have access field sorting of entity.
i've tried access like:
$category->getsorting(); but fails, method not exist. when dump entity, meta fields, hidden, starttime etc. aren't listed @ all.
how can tell typo3 load fields along other fields of entitiy?
since in extbase context, have add property model or (if use model of extension) extend , add property. in both cases getter , setter method needed if want access , edit properties value:
/** * @var integer */ protected $sorting; public function setsorting($sorting) { $this->sorting = $sorting; } public function getsorting() { return $this->sorting; } make sure have field configured in tca well:
... 'columns' => array( 'sorting' => array( 'label' => 'sorting', 'config' => array( 'type' => 'passthrough' ) ), ... after should able access sorting property.
Comments
Post a Comment