Shortcut function to add all items needed for OpenRosa

Should be enabled in application.ini by using useOpenRosa = 1

@param string $label Label for the container
765724
public function addOpenRosaContainer($label, $parent = null)
    {
        if ($this->escort->getOption('useOpenRosa')) {
            if (is_null($parent)) {
                $parent = $this;
            }
            $page = $parent->addBrowsePage($label, 'pr.openrosa','openrosa');
            $page->addButtonOnly($this->_('Scan Responses'), 'pr.openrosa.scan', 'openrosa', 'scanresponses');
            $this->addPage(null, null, 'openrosa', 'submission');
            $this->addPage(null, null, 'openrosa', 'formList'); //mind the capital L here
            $this->addPage(null, null, 'openrosa', 'download');
            $this->addPage(null, null, 'openrosa', 'barcode'); // For barcode rendering
            $this->addPage(null, 'pr.islogin', 'openrosa', 'image'); // For image rendering

            $this->addPage(null, null, 'open-rosa-form', 'edit');
        }
    }
372621
public function setLabel($label)
    {
        $this->textContent->prepend($label);
        $this->entity->setEntityName($label);

        return $this;
    }
573010
synchronized public void addLabel(String label) {
        if (!labelMap.contains(label)) {
            labelMap.add(labelCounter++, label);
        }
    }
662262
public function setLabel( $label ) {
		if ( $this->useInputTag ) {
			// Discard non-plaintext labels
			if ( !is_string( $label ) ) {
				$label = '';
			}

			$this->input->setValue( $label );
		}

		return $this->setLabelElementLabel( $label );
	}
374751
private Label createLabel(String label) {
        Pane pane = new Pane();
        root.addChild(pane);
        Label lbl = new Label();
        lbl.setName(label);
        pane.addChild(lbl);
        adjustPanes();
        return lbl;
    }
271194
public function hasLabel($label = null)
    {
        if (null !== $label) {
            foreach ($this->getLabels() as $k => $v) {
                if ($v == $label) {
                    return true;
                }
            }
        }

        if (null === $label && !empty($this->labels)) {
            return true;
        }

        return false;
    }
300477
public static function appendLabel($uri, $label)
    {
        $host = new Host(self::filterUri($uri)->getHost());
        if ($host->isDomain()) {
            return $uri->withHost((string) (new Domain($host))->append($label));
        }

        if ($host->isIpv4()) {
            $label = ltrim((string) new Host($label), '.');

            return $uri->withHost((string) $host->withContent($host->getContent().'.'.$label));
        }

        throw new SyntaxError(sprintf('The URI host %s can not be appended', (string) $host));
    }
761934
public function addButton($label, $class = 'Button')
    {
        if (!$this->buttonset) {
            $this->buttonset = $this->add('ButtonSet', null, 'grid_buttons')->setClass('atk-actions');
        }

        return $this->buttonset
            ->add($class, 'gbtn'.count($this->elements))
            ->set($label);
    }
814687
public function setLabel($label) {
		if (is_array($label) && empty($label)) {
			$this->label = new \stdClass;
		} else {
			$this->label = $label;
		}

		return $this;
	}
139983
public function label($label = null, $useLabelAsKey = true)
    {
        if (null !== $label) {
            $this->label = $label;
            $this->useLabelAsKey = $useLabelAsKey;

            return $this;
        }

        if ($this->useLabelAsKey) {
            return __($this->label);
        }
        return $this->label;
    }
1270373
public function setToggle($label)
    {
        if ($label instanceof Button) {
            $this->toggle = $label;
        } else {
            $this->toggle = new Button($label);
            $this->entity->setEntityName($label);
        }

        $this->toggle->attributes->addAttribute('data-toggle', 'dropdown');
        $this->toggle->attributes->addAttribute('aria-haspopup', true);
        $this->toggle->attributes->addAttribute('aria-expanded', false);
        $this->toggle->attributes->addAttributeClass('dropdown-toggle');

        return $this;
    }
1372095
public function addPlanPage($label)
    {
        $infoPage = $this->addContainer($label);

        $page = $infoPage->addPage($this->_('Track Summary'), 'pr.plan.summary', 'summary', 'index');
        $page->addAutofilterAction();
        $page->addExportAction();

        $page = $infoPage->addPage($this->_('Track Compliance'), 'pr.plan.compliance', 'compliance', 'index');
        $page->addAutofilterAction();
        $page->addExportAction();

        $page = $infoPage->addPage($this->_('Track Field Utilization'), 'pr.plan.fields', 'field-report', 'index');
        $page->addAutofilterAction();
        $page->addExportAction();

        $page = $infoPage->addPage($this->_('Track Field Content'), 'pr.plan.fields', 'field-overview', 'index');
        $page->addAutofilterAction();
        $page->addExportAction();

        $plans[] = $infoPage->addPage($this->_('By period'), 'pr.plan.overview', 'overview-plan', 'index');
        $plans[] = $infoPage->addPage($this->_('By token'), 'pr.plan.token', 'token-plan', 'index');
        $plans[] = $infoPage->addPage($this->_('By respondent'), 'pr.plan.respondent', 'respondent-plan', 'index');

        foreach ($plans as $plan) {
            $plan->addAutofilterAction();
            $plan->addAction($this->_('Bulk mail'), 'pr.token.bulkmail', 'email', array('routeReset' => false));
            $plan->addExportAction();
        }

        $page = $infoPage->addPage($this->_('Respondent status'), 'pr.plan.consent', 'consent-plan', 'index');
        $page->addShowAction();
        $page->addExportAction();

        return $infoPage;
    }
1026857
public function saveLabel(\stdClass $label)
    {
        if (!empty($label->tid)) {
            // Prevents to save a label with a parent if it has children.
            // The labels vocabulary must have only two levels.
            if (!isset($label->original)) {
                $label->original = $this->entityManager->getStorage('taxonomy_term')->loadUnchanged($label->tid);
            }
            if (!isset($label->original->parent)) {
                $label->original->parent = 0;
            }
            if ($this->hasChildren($label) && $label->parent != $label->original->parent) {
                throw new \LogicException("Can't define a parent to a label which has children.");
            }
        }

        return taxonomy_term_save($label);
    }
980882
public function label($label = null)
    {
        if (null !== $label) {
            $this->label = $label;

            return $this;
        }

        if (Lang::has($this->label)) {
            return __($this->label);
        }
        return $this->label;
    }
857759
public function label($label)
    {
        if (is_array($label)) {
            $this->label = array_merge($this->label, $label);
        } else {
            $this->label[$this->dateBindRule[count($this->dateBindRule) - 1]['field'][0]] = $label;
        }

        return $this;
    }
1042989
def add(self, label):
        
        label.label_list = self
        self.label_tree.addi(label.start, label.end, label)
493120
public static function setConnection(string $label=null)
    {
        if ($label === null && static::$currentConnection === null) {
            static::$currentConnection = static::getDefaultLabel();
            return;
        }

        $config = static::config();
        if (isset($config[$label])) {
            static::$currentConnection = $label;
        } else {
            throw new Exception('The provided label does not exist in the config.');
        }
    }