Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
dfd37ca2
Commit
dfd37ca2
authored
Sep 22, 2015
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(mvc) add parent to BaseField to support logic spawning over different fields
parent
186816e6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
BaseField.php
...nse/mvc/app/models/OPNsense/Base/FieldTypes/BaseField.php
+15
-0
No files found.
src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/BaseField.php
View file @
dfd37ca2
...
...
@@ -45,6 +45,11 @@ abstract class BaseField
*/
protected
$internalChildnodes
=
array
();
/**
* @var null pointer to parent
*/
protected
$internalParentNode
=
null
;
/**
* @var bool marks if this is a data node or a container
*/
...
...
@@ -185,6 +190,16 @@ abstract class BaseField
public
function
addChildNode
(
$name
,
$node
)
{
$this
->
internalChildnodes
[
$name
]
=
$node
;
$node
->
setParentNode
(
$this
);
}
/**
* set pointer to parent node, used by addChildNode to backref this node
* @param BaseField $node pointer to parent
*/
private
function
setParentNode
(
$node
)
{
$this
->
internalParentNode
=
$node
;
}
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment