[TYPO3-ect] recursive pid function for tx_div

Elmar Hinz elmar07 at googlemail.com
Mon Aug 13 09:10:07 CEST 2007


Steve Ryan wrote:

> Something that is useful in pibase is recursive pid search
> 
> .....
> something needs to be done with finding the cObj if this function is
> deemed to belong in tx_div statically....
> 
> useful?

Thanks, yes.

Something lost here?

> $pidQuery='(pid='.implode(' or pid=',$pidList).')';

Maybe?

$pidQuery='( 0 '.implode(' or pid=',$pidList).')';


> $cObj=$this->findCObject();

Leads to another idea for tx_div:

function findCObjectSingleton() {
  static $cObject;
  if(!is_object($cObject)) {
        // create it here
  }
  return $cObject;
}

Does this work as expected?


Regards

Elmar








More information about the TYPO3-team-extension-coordination mailing list