CMS
Version 3.9
content_inventory.inc
Go to the documentation of this file.
1
<?php
2
Fakoli::using
(
"developer_tools"
);
3
Fakoli::usingFeature
(
"grouped_data_view"
);
4
5
$page_title
=
"Content Inventory By Type"
;
6
$menu_item
=
"Content Inventory"
;
7
8
$showAll
= checkNumeric($_GET[
"showAll"
]);
9
10
$helper
=
new
ContentInventoryHelper
(
$showAll
);
11
12
$itemsByType
= array();
13
14
$itemsByType
=
ComponentManager::fireEvent
(
"EnumerateItems"
,
$itemsByType
);
15
16
$table
=
new
GroupedDataListView(
$itemsByType
,
"items_by_type"
);
17
$table
->column(
"Identifier"
,
"<strong>{identifier}</strong>"
,
true
,
"width: 20%"
)
18
->column(
"Title"
,
"{DeveloperToolsManager::formatDefault}"
,
true
,
"width: 40%"
)
19
->column(
"Used in Section(s)"
,
"{DeveloperToolsManager::formatSections}"
,
true
,
"width: 40%"
);
20
$table
->onStartRow = array(
$helper
,
onStartRow
);
21
22
foreach
(array_keys(
$itemsByType
) as
$group
)
23
{
24
$table
->group(
$group
,
$group
);
25
}
26
27
$table
->mode =
"tree"
;
28
$table
->groupAsWorksheets =
true
;
29
$table
->excelFile = codify(
$config
[
'sitename'
].
"_content_inventory"
).
".xls"
;
30
31
$script
.=
$table
->writeScript();
32
33
$checked
=
$showAll
?
"checked='checked'"
:
""
;
34
35
?>
36
<p><input type=
'checkbox'
name=
'showAll'
value=
'1'
<?echo
$checked
?> onclick=
'location.href="?showAll=" + (this.checked ? "1" : "");'
/> Show unmapped items</p>
37
<?
38
$table
->drawView();
ComponentManager\fireEvent
static fireEvent($event, $parameter=null, $mustBeConsumed=false)
Fire an event to all subscribers as detailed in their manifests.
Definition:
component_manager.inc:442
ContentInventoryHelper
Definition:
content_inventory_helper.inc:10
Fakoli\usingFeature
static usingFeature()
Uses the specified framework feature(s).
Definition:
core.inc:388
Fakoli\using
static using()
Import the datamodels, views and manifest for the specified component(s).
Definition:
core.inc:116
$showAll
$showAll
Definition:
content_inventory.inc:8
onStartRow
$table onStartRow
Definition:
content_inventory.inc:20
$checked
$checked
Definition:
content_inventory.inc:33
$helper
$helper
Definition:
content_inventory.inc:10
$menu_item
$menu_item
Definition:
content_inventory.inc:6
$itemsByType
$itemsByType
Definition:
content_inventory.inc:12
$page_title
$page_title
Definition:
content_inventory.inc:5
$table
$table
Definition:
content_inventory.inc:16
$script
$script
Definition:
content_inventory.inc:31
$group
$group
Definition:
group_form.inc:43
$config
global $config
Definition:
import.inc:4
code
cms.sonjara.com
cms
components
developer_tools
admin
content_inventory.inc
Generated on Tue Mar 23 2021 15:36:12 for CMS by
1.9.1