CMS
Version 3.9
clear_content_properties.inc
Go to the documentation of this file.
1
<?php
2
Fakoli::using
(
"section"
,
"field_renderers"
);
3
Fakoli::usingFeature
(
"auto_form"
);
4
5
Fakoli::assertRole
(
"admin"
);
6
$ids
= checkNumeric($_GET[
"section_content_id"
]);
7
8
// Reset each of the supplied section content records to default.
9
10
$sectionContent
=
new
SectionContent
();
11
$sectionContent
->filter =
new
InclusionFilter(
"section_content_id"
,
"template"
,
"role"
,
"use_SSL"
);
12
13
foreach
(
$ids
as
$id
)
14
{
15
$sectionContent
->section_content_id =
$id
;
16
$sectionContent
->template =
""
;
17
$sectionContent
->role =
""
;
18
$sectionContent
->use_SSL =
false
;
19
$sectionContent
->save();
20
}
21
22
Fakoli::end
(
"OK"
);
23
?>
$id
$id
Definition:
blog_archives.inc:22
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
Fakoli\end
static end($message="")
Use this method to terminate execution of a script instead of using the php keywords exit() or die().
Definition:
core.inc:1149
Fakoli\assertRole
static assertRole($role, $redirect="", $message="")
Assert that the user has one of the specified roles.
Definition:
core.inc:297
SectionContent
Definition:
section.inc:251
$sectionContent
$sectionContent
Definition:
clear_content_properties.inc:10
$ids
$ids
Definition:
clear_content_properties.inc:6
code
cms.sonjara.com
cms
components
section
handlers
clear_content_properties.inc
Generated on Tue Mar 23 2021 15:36:14 for CMS by
1.9.1