src/Common/Traits/Model/Nestable.php
public function create(array $aData = [], $bReturnObject = false)
    {
        $mResult = parent::create($aData, $bReturnObject);
        if ($mResult) {
            $this->saveBreadcrumbs($bReturnObject ? $mResult->id : $mResult);
            $this->saveOrder();
            //  Refresh object to get updated breadcrumbs/URL
            if ($bReturnObject) {
                $mResult = $this->getById($mResult->id);
            }
        }
        return $mResult;
    }
public function create(array $aData = [], $bReturnObject = false)
    {
        $mResult = parent::create($aData, $bReturnObject);
        if ($mResult) {
            $this->saveBreadcrumbs($bReturnObject ? $mResult->id : $mResult);
            $this->saveOrder();
            //  Refresh object to get updated breadcrumbs/URL
            if ($bReturnObject) {
                $mResult = $this->getById($mResult->id);
            }
        }
        return $mResult;
    }
public function create ( array $ aData = [ ] , $ bReturnObject = false ) { $ mResult = parent :: create ( $ aData , $ bReturnObject ) ; if ( $ mResult ) { $ this -> saveBreadcrumbs ( $ bReturnObject ? $ mResult -> id : $ mResult ) ; $ this -> saveOrder ( ) ; //  Refresh object to get updated breadcrumbs/URL if ( $ bReturnObject ) { $ mResult = $ this -> getById ( $ mResult -> id ) ; } } return $ mResult ; }
Generates breadcrumbs after creating an object

@param array $aData         Data to create the item with
@param bool  $bReturnObject Whether to return an object or not

@return mixed
Generates breadcrumbs after creating an object