This repository has been archived by the owner on Aug 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
ClipVersion.php
61 lines (55 loc) · 2.03 KB
/
ClipVersion.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php
/**
* Clip
*
* @copyright (c) Clip Team
* @link http://github.com/zikula-modules/clip/
* @license GNU/GPL - http://www.gnu.org/copyleft/gpl.html
* @package Clip
* @subpackage Version
*/
namespace Matheo\Clip;
use ModUtil;
use Matheo\Clip\Util;
use HookUtil;
class ClipVersion extends \Zikula_AbstractVersion
{
protected function setupHookBundles()
{
$modinfo = ModUtil::getInfoFromName($this->getName());
if ($modinfo['state'] == ModUtil::STATE_ACTIVE) {
$this->setupPubtypeBundles();
}
}
public function setupPubtypeBundles()
{
static $loaded = false;
// paranoic check for module upgrade
if (!$loaded) {
$pubtypes = Util::getPubType();
foreach ($pubtypes as $pubtype) {
$pubtype->registerHookBundles($this);
}
$loaded = true;
}
}
public function getMetaData()
{
$meta = array();
$meta['displayname'] = $this->__('Clip');
$meta['description'] = $this->__('Dynamic content publishing platform for Zikula.');
$meta['oldnames'] = array('PageMaster', 'Clip');
//! module name that appears in URL
$meta['url'] = $this->__('clip');
$meta['version'] = '0.9.4';
$meta['core_min'] = '1.4.1';
$meta['core_max'] = '1.4.99';
// Capabilities
$meta['capabilities'] = array(HookUtil::SUBSCRIBER_CAPABLE => array('enabled' => true, HookUtil::SUBSCRIBE_OWN => true));
// Permissions schema
$meta['securityschema'] = array('Clip::' => '::', 'Clip:grouptypeid:main' => 'tid::templateid', 'Clip:grouptypeid:list' => 'tid::templateid', 'Clip:grouptypeid:display' => 'tid:pid:templateid', 'Clip:grouptypeid:edit' => 'tid::', 'Clip:grouptypeid:edit' => 'tid:pid:workflowstate');
// Module depedencies
$meta['dependencies'] = array(array('modname' => 'Scribite', 'minversion' => '4.2.1', 'maxversion' => '', 'status' => ModUtil::DEPENDENCY_RECOMMENDED));
return $meta;
}
}