Gets all checked widgets in the group
@return list of checked widgets
358069
public <T extends Widget & Checkable> List<T> getCheckedWidgets() {
        List<T> checked = new ArrayList<>();

        for (Widget c : getChildren()) {
            if (c instanceof Checkable && ((Checkable) c).isChecked()) {
                checked.add((T) c);
            }
        }

        return checked;
    }
1083671
protected List<CmsPushButton> getButtons() {

        CmsPushButton workplaceButton = new CmsPushButton();
        workplaceButton.setText(getMessage(Messages.GUI_CONFIRMATION_WORKPLACE_BUTTON_0));
        workplaceButton.addClickHandler(new ClickHandler() {

            @SuppressWarnings("synthetic-access")
            public void onClick(ClickEvent e) {

                Window.Location.assign(m_closeLink);
            }
        });
        List<CmsPushButton> result = new ArrayList<CmsPushButton>();
        if (m_isWorkplaceUser) {
            result.add(workplaceButton);
        }
        return result;
    }
872486
public List<Group> findAllGroups() {
        ArrayList<Group> allGroups = new ArrayList<Group>();
        PreparedStatement queryStatement = null;
        ResultSet results = null;
        try (Connection sqlConnection = sqlService.getConnection()) {
            queryStatement = sqlConnection.prepareStatement("SELECT * FROM "
                                                                + Constants.DB_TABLE_GROUPS +
                                                                " ORDER BY " + Constants.GROUPS_GROUP_NAME);
            results = queryStatement.executeQuery();
            while (results.next()) {
                Group group = new Group();
                group.setId(results.getInt(Constants.GENERIC_ID));
                group.setName(results.getString(Constants.GROUPS_GROUP_NAME));
                allGroups.add(group);
            }
        } catch (SQLException e) {
            e.printStackTrace();
        } finally {
            try {
                if (results != null) {
                    results.close();
                }
            } catch (Exception e) {
            }
            try {
                if (queryStatement != null) {
                    queryStatement.close();
                }
            } catch (Exception e) {
            }
        }

        return allGroups;
    }
491920
public List<Statement> getAllStatements() {
        final List<Statement> ret = new LinkedList<Statement>();
        for (final StatementGroup sg : statementGroups) {
            ret.addAll(sg.getAllStatements());
        }
        return ret;
    }
442173
function _getElements( group, selector ) {
    if ( selector ) {
        if ( selector === 'form' ) {
            return [ formHtml ];
        }
        // e.g. if the widget selector starts at .question level (e.g. ".or-appearance-draw input")
        if ( group.classList.contains( 'question' ) ) {
            return [ ...group.querySelectorAll( 'input:not(.ignore), select:not(.ignore), textarea:not(.ignore)' ) ]
                .filter( el => el.matches( selector ) );
        }
        return [ ...group.querySelectorAll( selector ) ];
    }

    return [];
}
259607
protected List<CmsGroup> getGroups() throws CmsException {

        return CmsPrincipal.filterCoreGroups(OpenCms.getOrgUnitManager().getGroups(getCms(), "", true));
    }
354071
private List<CmsSelectWidgetOption> getSortWidgetConfiguration() {

        List<CmsSelectWidgetOption> result = new LinkedList<CmsSelectWidgetOption>();
        CmsMessages messages = Messages.get().getBundle(getLocale());
        result.add(
            new CmsSelectWidgetOption(
                CmsSearchParameters.SORT_NAMES[0],
                true,
                messages.key(Messages.GUI_SELECT_LABEL_SEARCH_SORT_SCORE_0)));
        result.add(
            new CmsSelectWidgetOption(
                CmsSearchParameters.SORT_NAMES[1],
                false,
                messages.key(Messages.GUI_SELECT_LABEL_SEARCH_SORT_DATE_CREATED_0)));
        result.add(
            new CmsSelectWidgetOption(
                CmsSearchParameters.SORT_NAMES[2],
                false,
                messages.key(Messages.GUI_SELECT_LABEL_SEARCH_SORT_DATE_LAST_MODIFIED_0)));
        result.add(
            new CmsSelectWidgetOption(
                CmsSearchParameters.SORT_NAMES[3],
                false,
                messages.key(Messages.GUI_SELECT_LABEL_SEARCH_SORT_TITLE_0)));
        return result;
    }
967320
def get_checked(self):
        """"""
        checked = []

        def get_checked_children(item):
            if not self.tag_has("unchecked", item):
                ch = self.get_children(item)
                if not ch and self.tag_has("checked", item):
                    checked.append(item)
                else:
                    for c in ch:
                        get_checked_children(c)

        ch = self.get_children("")
        for c in ch:
            get_checked_children(c)
        return checked
898065
def on_checked_changed(self, group, checked_id):
        
        d = self.declaration
        if checked_id < 0:
            with self.widget.clearCheck.suppressed():
                d.checked = None
            return
        else:
            for c in self.children():
                if c.widget.getId() == checked_id:
                    with self.widget.check.suppressed():
                        d.checked = c.declaration
                    return
1010535
public String[] getAllGroups()
	{
		String[] groups = new String[allGroups.size()];
		allGroups.toArray(groups);
		return groups;
	}
414819
public List<Section> getTickmarkSections() {
        List<Section> tickmarkSectionsCopy = new ArrayList<Section>(10);
        tickmarkSectionsCopy.addAll(tickmarkSections);
        return tickmarkSectionsCopy;
    }
1208776
public java.util.List<String> getGroupNames() {
        if (groupNames == null) {
            groupNames = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return groupNames;
    }
732104
public function componentsList()
    {
        $function = function () {

            $widgets = app('antares.widget')->make('menu.top.right')->items();

            if (!isset($widgets["ui-components-selector"])) {
                return [];
            }
            $childs = $widgets["ui-components-selector"]->childs;
            if (empty($childs)) {
                return [];
            }
            $disabled = Registry::get('ui-components.disabled');
            $viewed   = Registry::get('ui-components.viewed');

            foreach ($childs as $index => $child) {
                $classname = array_get($child->attributes, 'classname');
                if (!is_null($viewed) and ! $viewed->contains($classname)) {
                    unset($childs[$index]);
                }
                if (!is_null($disabled) and $disabled->contains($classname)) {
                    unset($childs[$index]);
                }
            }
            return $childs;
        };
        return new Twig_SimpleFunction(
                'components_list', $function
        );
    }
1233943
public function widgetsManagementAction()
    {
        $widgets = $this->widgetManager->getAll();
        $toOrder = array();

        foreach ($widgets as $widget) {
            $widgetName = $this->translator->trans($widget->getName(), array(), 'widget');
            $toOrder[$widgetName] = $widget;
        }
        ksort($toOrder);

        return array('widgets' => $toOrder);
    }
577752
protected List<CmsSelectWidgetOption> getSelectRoles() {

        List<CmsSelectWidgetOption> retVal = new ArrayList<CmsSelectWidgetOption>();

        try {
            boolean inRootOu = CmsStringUtil.isEmptyOrWhitespaceOnly(getParamOufqn())
                || CmsOrganizationalUnit.SEPARATOR.equals(getParamOufqn());
            List<CmsRole> roles = OpenCms.getRoleManager().getRolesOfUser(
                getCms(),
                getCms().getRequestContext().getCurrentUser().getName(),
                getParamOufqn(),
                false,
                false,
                false);
            Iterator<CmsRole> itRoles = roles.iterator();
            while (itRoles.hasNext()) {
                CmsRole role = itRoles.next();
                if (role.isOrganizationalUnitIndependent() && !inRootOu) {
                    continue;
                }
                retVal.add(new CmsSelectWidgetOption(role.getGroupName(), false, role.getName(getLocale())));
            }
        } catch (CmsException e) {
            // noop
        }
        Collections.sort(retVal, new Comparator<CmsSelectWidgetOption>() {

            public int compare(CmsSelectWidgetOption arg0, CmsSelectWidgetOption arg1) {

                return arg0.getOption().compareTo(arg1.getOption());
            }

        });
        return retVal;
    }
701788
public static Iterator<Widget> getChildren(Widget w) {
    if (w instanceof Panel) {
      return ((Panel) w).iterator();
    }
    if (w instanceof Composite) {
      return getChildren(compositeGetWidget((Composite) w));
    }
    return null;
  }
728543
private List<CmsSelectWidgetOption> getViews() {

        List<CmsSelectWidgetOption> views = new ArrayList<CmsSelectWidgetOption>();

        // determine the default view
        String defaultView = null;
        if ((m_user != null) && CmsStringUtil.isNotEmptyOrWhitespaceOnly(m_user.getName())) {
            defaultView = new CmsUserSettings(m_user).getStartView();
        }
        if (CmsStringUtil.isEmptyOrWhitespaceOnly(defaultView)) {
            defaultView = VIEW_WORKPLACE;
        }

        // get the workplace views
        List<CmsWorkplaceView> list = new ArrayList<CmsWorkplaceView>(OpenCms.getWorkplaceManager().getViews());

        // add the direct edit view to the list
        String displayName = getMessages().key(org.opencms.workplace.commons.Messages.GUI_LABEL_DIRECT_EDIT_VIEW_0);
        list.add(new CmsWorkplaceView(displayName, VIEW_DIRECT_EDIT, Float.valueOf(100)));

        // loop over the views and create a CmsSelectWidgetOption for each readable view
        for (CmsWorkplaceView view : list) {
            boolean visible = true;
            try {
                getCms().readResource(view.getUri());
            } catch (CmsException e) {
                // should usually never happen
                if (LOG.isInfoEnabled()) {
                    LOG.info(e.getLocalizedMessage());
                }
                visible = false;
            }
            if (visible) {
                boolean selected = view.getUri().equals(defaultView);
                views.add(new CmsSelectWidgetOption(view.getUri(), selected, resolveMacros(view.getKey()), null));
            }
        }
        return views;
    }