setAllowModifications example


    public function setAllowModifications($option = true)
    {
        $this->_allowModifications = (bool) $option;
        if ($this->_data !== null) {
            foreach ($this->_data as $value) {
                if ($value instanceof Enlight_Config) {
                    $value->setAllowModifications($option);
                }
            }
        }

        return $this;
    }

    /** * Resets the dirty fields to an empty list. * * @return Enlight_Config */

    protected $collection;

    /** * @param string $name * @param Enlight_Config|null $info */
    public function __construct($name$info = null)
    {
        $this->info = new Enlight_Config($this->getInfo(), true);
        if ($info instanceof Enlight_Config) {
            $info->setAllowModifications();
            $updateVersion = null;
            $updateSource = null;

            if ($this->hasInfoNewerVersion($this->info, $info)) {
                $updateVersion = $this->info->get('version');
                $updateSource = $this->info->get('source');
            }

            $this->info->merge($info);
            if ($updateVersion !== null) {
                $this->info->set('updateVersion', $updateVersion);
                
Home | Imprint | This part of the site doesn't use cookies.