public function getBlameableBehaviors()
    {
        $cache = $this->getCache();
        if ($cache) {
            $this->blameableLocalBehaviors = $cache->get($this->getBlameableBehaviorsCacheKey());
        }
        if (empty($this->blameableLocalBehaviors) || !is_array($this->blameableLocalBehaviors)) {
            if ($cache) {
                TagDependency::invalidate($cache, [$this->getEntityBehaviorsCacheTag()]);
            }
            $behaviors = parent::behaviors();
            $behaviors['blameable'] = [
                'class' => BlameableBehavior::class,
                'createdByAttribute' => $this->createdByAttribute,
                'updatedByAttribute' => $this->updatedByAttribute,
                'value' => [$this,
                    'onGetCurrentUserGuid'],
            ];
            $this->setBlameableBehaviors($behaviors);
        }
        return $this->blameableLocalBehaviors;
    }
public function getBlameableBehaviors()
    {
        $cache = $this->getCache();
        if ($cache) {
            $this->blameableLocalBehaviors = $cache->get($this->getBlameableBehaviorsCacheKey());
        }
        if (empty($this->blameableLocalBehaviors) || !is_array($this->blameableLocalBehaviors)) {
            if ($cache) {
                TagDependency::invalidate($cache, [$this->getEntityBehaviorsCacheTag()]);
            }
            $behaviors = parent::behaviors();
            $behaviors['blameable'] = [
                'class' => BlameableBehavior::class,
                'createdByAttribute' => $this->createdByAttribute,
                'updatedByAttribute' => $this->updatedByAttribute,
                'value' => [$this,
                    'onGetCurrentUserGuid'],
            ];
            $this->setBlameableBehaviors($behaviors);
        }
        return $this->blameableLocalBehaviors;
    }
public function getBlameableBehaviors ( ) { $ cache = $ this -> getCache ( ) ; if ( $ cache ) { $ this -> blameableLocalBehaviors = $ cache -> get ( $ this -> getBlameableBehaviorsCacheKey ( ) ) ; } if ( empty ( $ this -> blameableLocalBehaviors ) || ! is_array ( $ this -> blameableLocalBehaviors ) ) { if ( $ cache ) { TagDependency :: invalidate ( $ cache , [ $ this -> getEntityBehaviorsCacheTag ( ) ] ) ; } $ behaviors = parent :: behaviors ( ) ; $ behaviors [ 'blameable' ] = [ 'class' => BlameableBehavior :: class , 'createdByAttribute' => $ this -> createdByAttribute , 'updatedByAttribute' => $ this -> updatedByAttribute , 'value' => [ $ this , 'onGetCurrentUserGuid' ] , ] ; $ this -> setBlameableBehaviors ( $ behaviors ) ; } return $ this -> blameableLocalBehaviors ; }
Get blameable behaviors. If current behaviors array is empty, the init
array will be given.
@return array
Get blameable behaviors . If current behaviors array is empty the init array will be given .