Posted by & filed under TYPO3.

USER content objects are cached with the page. USER_INT object are not. Some plugins may need to operate in both modes, depending on the way they are called, parameters they are issued, or execution path they take. The new option allows to convert the content object into a USER_INT object from USER during execution. Here is the sample code:


if ($this->cObj->getUserObjType() == tslib_cObj::OT_USER) {
  $content = 'I am running as USER object now.';
  if (!$this->conf['allowCaching']) {
    $this->cObj->convertToUSER_INT();
    return '';
  }
}
else {
  $content .= 'I am running as USER_INT right now';
}

If allowCaching option is set to 1, the content element will switch to a USER_INT execution mode.

More info:
RFC #8985: Enable USER object to become USER_INT on the fly
http://bugs.typo3.org/view.php?id=8985

Leave a Reply

  • (will not be published)