Airship\Cabin\Bridge\Blueprint\Skyport::countInstalled PHP Method

countInstalled() public method

Get the number of packages installed
public countInstalled ( ) : integer
return integer
    public function countInstalled() : int
    {
        return (int) $this->db->cell('SELECT count(packageid) FROM airship_package_cache WHERE installed');
    }

Usage Example

Esempio n. 1
0
 /**
  * @route ajax/admin/skyport/installed
  */
 public function ajaxGetInstalledPackages()
 {
     $numInstalled = $this->skyport->countInstalled();
     list($page, $offset) = $this->getPaginated($numInstalled);
     $this->lens('skyport/list', ['headline' => 'Installed Extensions', 'extensions' => $this->skyport->getInstalled(false, $offset, $this->perPage), 'pagination' => ['count' => $numInstalled, 'page' => $page, 'per_page' => $this->perPage]]);
 }