API16

JRules/merge

From Joomla! Documentation

< API16:JRules
Revision as of 21:02, 24 March 2017 by JoomlaWikiBot (talk | contribs) (preparing for archive only)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The "API16" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

Description[edit]

Method to merge actions with this object.



Syntax[edit]

merge($actions)
Parameter Name Default Value Description
$actions

Defined in[edit]

libraries/joomla/access/rules.php

Importing[edit]

jimport( 'joomla.access.rules' );

Source Body[edit]

public function merge($actions)
{
        if (is_string($actions)) {
                $actions = json_decode($actions, true);
        }

        if (is_array($actions))
        {
                foreach ($actions as $action => $identities) {
                        $this->mergeAction($action, $identities);
                }
        }
        else if ($actions instanceof JRules)
        {
                $data = $actions->getData();

                foreach ($data as $name => $identities) {
                        $this->mergeAction($name, $identities);
                }
        }
}



Examples[edit]

Code Examples[edit]