diff --git a/lowblocks/variables/LowBlocksVariable.php b/lowblocks/variables/LowBlocksVariable.php index eda2e76..b5e4fc3 100644 --- a/lowblocks/variables/LowBlocksVariable.php +++ b/lowblocks/variables/LowBlocksVariable.php @@ -3,22 +3,26 @@ class LowBlocksVariable { - protected $criteria; public function __construct() { $this->criteria = craft()->elements->getCriteria(ElementType::MatrixBlock); } - - public function id($id) - { - $this->criteria->id = $id; - return $this->criteria->first(); - } - public function blocks() - { - return $this->criteria; - } + public function id($id) + { + $this->criteria->id = $id; + return $this->criteria->first(); + } + + public function blocks() + { + return $this->criteria; + } + + public function blocksParams($params) + { + return craft()->elements->getCriteria(ElementType::MatrixBlock, $params); + } } \ No newline at end of file