# css-javascript-toolbox/trunk/models/xblock.php

CSS &amp; JavaScript Toolbox, version trunk. 36 lines.

- Page: https://pluginprobe.com/plugins/css-javascript-toolbox/trunk/code/models/xblock.php
- Raw: https://pluginprobe.com/plugins/css-javascript-toolbox/trunk/raw/models/xblock.php
- Modified: 2013-03-17T20:09:52+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/trunk/code/models/xblock.php#L10-L20`.

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

/**
* This file is a future replacement for block.php file.
* 
* The controller @block.php file is deprecated and all the feature actions
* for a single block should be defined here!
* 
*/
class CJTXBlockModel {
	
	/**
	* put your comment there...
	* 
	* @var mixed
	*/
	public $inputs;
	
	/**
	* Query Block based on the passed paramaters.
	* 
	*/
	public function getBlockBy() {
		// import dependencies.
		cssJSToolbox::import('framework:db:mysql:xtable.inc.php');
		return CJTxTable::getInstance('block')
		->set($this->inputs['filter']['field'], $this->inputs['filter']['value'])
		->load(array($this->inputs['filter']['field']))
		->getData();
	}
	
} // End class.

```
