Exemple #1
0
 /**
  * Gets the parent asset id for the record
  *
  * @return  int
  * @since   2.0.0
  */
 private function getAssetParentId()
 {
     $assetId = null;
     // Build the query to get the asset id for the parent category
     $query = new Query();
     $query->select('id')->from('#__assets')->whereEquals('name', 'com_' . $this->model->getNamespace());
     if ($results = $query->fetch()) {
         $result = $results[0];
         $assetId = (int) $result->id;
     }
     return $assetId ? $assetId : $this->getRootId();
 }