common/models/resources/Category.php
public function getRoot() {

		$parentTable = CoreTables::getTableName( CoreTables::TABLE_CATEGORY );

		return $this->hasOne( Category::class, [ 'id' => 'rootId' ] )->from( "$parentTable as root" );
	}
public function getRoot() {

		$parentTable = CoreTables::getTableName( CoreTables::TABLE_CATEGORY );

		return $this->hasOne( Category::class, [ 'id' => 'rootId' ] )->from( "$parentTable as root" );
	}
public function getRoot ( ) { $ parentTable = CoreTables :: getTableName ( CoreTables :: TABLE_CATEGORY ) ; return $ this -> hasOne ( Category :: class , [ 'id' => 'rootId' ] ) -> from ( "$parentTable as root" ) ; }
Return the root parent of the category.

@return Category
Return the root parent of the category .