protected function deleteObjectRoutes()
    {
        if (!$this->objType()) {
            return false;
        }

        if (!$this->id()) {
            return false;
        }

        $loader = $this->createRouteObjectCollectionLoader();
        $loader
            ->addFilters([
                [
                    'property' => 'route_obj_type',
                    'value'    => $this->objType(),
                ],
                [
                    'property' => 'route_obj_id',
                    'value'    => $this->id(),
                ],
            ]);

        $collection = $loader->load();
        foreach ($collection as $route) {
            $route->delete();
        }

        return true;
    }
protected function deleteObjectRoutes()
    {
        if (!$this->objType()) {
            return false;
        }

        if (!$this->id()) {
            return false;
        }

        $loader = $this->createRouteObjectCollectionLoader();
        $loader
            ->addFilters([
                [
                    'property' => 'route_obj_type',
                    'value'    => $this->objType(),
                ],
                [
                    'property' => 'route_obj_id',
                    'value'    => $this->id(),
                ],
            ]);

        $collection = $loader->load();
        foreach ($collection as $route) {
            $route->delete();
        }

        return true;
    }
protected function deleteObjectRoutes ( ) { if ( ! $ this -> objType ( ) ) { return false ; } if ( ! $ this -> id ( ) ) { return false ; } $ loader = $ this -> createRouteObjectCollectionLoader ( ) ; $ loader -> addFilters ( [ [ 'property' => 'route_obj_type' , 'value' => $ this -> objType ( ) , ] , [ 'property' => 'route_obj_id' , 'value' => $ this -> id ( ) , ] , ] ) ; $ collection = $ loader -> load ( ) ; foreach ( $ collection as $ route ) { $ route -> delete ( ) ; } return true ; }
Delete all object routes.

Should be called on object deletion {@see \Charcoal\Model\AbstractModel::preDelete()}.

@return boolean Success or failure.
Delete all object routes .