예제 #1
0
    ?>
] = '<?php 
    echo $dot->getName();
    ?>
';
<?php 
}
foreach (Plugins::instance()->getActive() as $p) {
    $js_code = 'if (og.' . $p->getName() . ' && og.' . $p->getName() . '.init) og.' . $p->getName() . '.init();' . "\n";
    echo $js_code;
}
?>

og.dimension_object_type_contents = [];
<?php 
$dotcs = DimensionObjectTypeContents::findAll();
foreach ($dotcs as $dotc) {
    /* @var $dotc DimensionObjectTypeContent */
    ?>
		var dim = <?php 
    echo $dotc->getDimensionId();
    ?>
;
		var dot = <?php 
    echo $dotc->getDimensionObjectTypeId();
    ?>
;
		var cot = <?php 
    echo $dotc->getContentObjectTypeId();
    ?>
;
예제 #2
0
 function getAllowedObjectTypeContents()
 {
     return DimensionObjectTypeContents::findAll(array('conditions' => array("`dimension_id` = ?\n\t\t\tAND (`content_object_type_id` IN (SELECT `id` FROM " . ObjectTypes::instance()->getTableName(true) . " WHERE `type` = 'located')\n\t\t\tOR ( \n\t\t\t\t`content_object_type_id` NOT IN (SELECT `object_type_id` FROM " . TabPanels::instance()->getTableName(true) . " WHERE `enabled` = 0) \n\t  \t\t\tAND `content_object_type_id` IN (\n\t  \t\t\t\tSELECT `id` FROM " . ObjectTypes::instance()->getTableName(true) . " WHERE `type` = 'content_object' AND `name` <> 'file revision'\n\t  \t\t\t\t\tAND IF(plugin_id is NULL OR plugin_id = 0, TRUE, plugin_id IN (SELECT id FROM " . TABLE_PREFIX . "plugins WHERE is_activated > 0 AND is_installed > 0))\n\t  \t\t\t)\n  \t\t\t))", $this->getId()), 'distinct' => true));
 }