# css-javascript-toolbox/7.1.1/models/package/block.php

CSS &amp; JavaScript Toolbox, version 7.1.1. 47 lines.

- Page: https://pluginprobe.com/plugins/css-javascript-toolbox/7.1.1/code/models/package/block.php
- Raw: https://pluginprobe.com/plugins/css-javascript-toolbox/7.1.1/raw/models/package/block.php
- Modified: 2014-05-06T16:47:26+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/css-javascript-toolbox/7.1.1/code/models/package/block.php#L10-L20`.

```php
<?php
/**
* 
*/

/**
* 
*/
class CJT_Models_Package_Block {
	
	/**
	* put your comment there...
	* 
	* @var mixed
	*/
	protected $id = null;
	
	/**
	* put your comment there...
	* 
	* @param mixed $blockId
	* @return CJT_Models_Package_Block
	*/
	public function __construct($id) {
		// Initialize.
		$this->id = $id;
	}
	
	/**
	* put your comment there...
	* 
	*/
	public function getPackageInfo() {
		// Initialize.
		$driver = cssJSToolbox::getInstance()->getDBDriver();
		// Query package info for the current block.
		$query = "SELECT p.id, p.author, p.webSite
											FROM #__cjtoolbox_packages p RIGHT JOIN #__cjtoolbox_package_objects o
											ON p.id = o.packageId AND o.objectType = 'block'
											WHERE o.objectId = {$this->id};";
		// Exec!
		$packageInfo = $driver->getRow($query, ARRAY_A);
		return $packageInfo;
	}

} // End class.

```
