| 1 |
<?php |
| 2 |
/** |
| 3 |
* |
| 4 |
*/ |
| 5 |
|
| 6 |
/** |
| 7 |
* |
| 8 |
*/ |
| 9 |
abstract class CJT_Models_Block_Assignmentpanel_Wordpress |
| 10 |
extends CJT_Models_Block_Assignmentpanel_Base { |
| 11 |
|
| 12 |
/** |
| 13 |
* put your comment there... |
| 14 |
* |
| 15 |
*/ |
| 16 |
protected function pinsMap() { |
| 17 |
// Initialize. |
| 18 |
$blockId = $this->getBlockId(); |
| 19 |
$params = $this->getTypeParams(); |
| 20 |
$pinsMap = array(); |
| 21 |
// Prepare block pinned items. |
| 22 |
$dbDriver = cssJSToolbox::getInstance()->getDBDriver(); |
| 23 |
$pinsTable = new CJTBlockPinsTable($dbDriver); |
| 24 |
$pins = $pinsTable->get(null, array('blockId' => $blockId, 'pin' => $params['group'])); |
| 25 |
// Create ITEM-ID => VALUE array map for the retrieved pins. |
| 26 |
foreach ($pins as $pin) { |
| 27 |
$pinsMap[$pin->value] = true; |
| 28 |
} |
| 29 |
// Returns. |
| 30 |
return $pinsMap; |
| 31 |
} |
| 32 |
|
| 33 |
} // End class. |
| 34 |
|