getSubElement

@see BaseRange
502331
protected function getSubElement($element)
    {
        if ($element === BaseRange::INFINITY_MIN) {
            return BaseRange::INFINITY_MIN;
        } elseif ($element === BaseRange::INFINITY_MAX) {
            return BaseRange::INFINITY_MAX;
        } elseif ($element === '') {
            return null;
        }

        return new \DateTime($element);
    }
1074494
private Element getTabElement(int tabIndex) {

        Element tabRootEl = m_tabPanel.getElement();
        // set an additional css class for the parent element of the .gwt-TabLayoutPanelTabs element
        List<Element> tabDivs = CmsDomUtil.getElementsByClass(
            I_CmsLayoutBundle.INSTANCE.tabbedPanelCss().cmsTabLayoutPanelTab(),
            CmsDomUtil.Tag.div,
            tabRootEl);
        if ((tabDivs != null) && (tabDivs.size() > tabIndex)) {
            return tabDivs.get(tabIndex);
        }
        return null;
    }
1188225
private Object getPreviousElement() {
        Object element = null;
        while (currentIndex >= startIndex && element == null) {
            currentIndex--;
            element = getElement();
        }
        return element;
    }
534574
function getElementRoot(element) {
        var curr = element;
        while (curr.parentNode) {
            curr = curr.parentNode;
        }
        return curr;
    }
852529
public FSArray getRangeList() {
    if (OntRelationMention_Type.featOkTst && ((OntRelationMention_Type)jcasType).casFeat_rangeList == null)
      jcasType.jcas.throwFeatMissing("rangeList", "de.julielab.jules.types.OntRelationMention");
    return (FSArray)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((OntRelationMention_Type)jcasType).casFeatCode_rangeList)));}
430882
protected function getTreeElement( $range )
	{

		$dataService = TreeService::singleton();
		/**
		 * @var tao_helpers_form_elements_xhtml_Combobox $element
		 */
		$element     = tao_helpers_form_FormFactory::getElement( "{$this->getIndex()}_range_tree", 'Combobox' );
		$element->setDescription( __( 'Tree values' ) );
		$element->addAttribute( 'class', 'property-template tree-template' );
		$element->addAttribute( 'disabled', 'disabled' );
		$element->setEmptyOption( ' --- ' . __( 'select' ) . ' --- ' );
		$treeOptions = array();
		foreach ($dataService->getTrees() as $tree) {
			$treeOptions[tao_helpers_Uri::encode( $tree->getUri() )] = $tree->getLabel();
			if (null !== $range && $range->getUri() === $tree->getUri()) {
				$element->setValue( $tree->getUri() );
			}
		}
		$element->setOptions( $treeOptions );

		return $element;
	}
877076
public function getSubmittingElement() {

		// cache submitting element

		if(!empty($this->clickedSubmit)) {
			return $this->clickedSubmit;
		}

		if(is_null($this->requestValues)) {
			return null;
		}

		foreach($this->elements as $name => $e) {

			if(is_array($e)) {

				// parse one-dimensional arrays

				foreach($this->requestValues->keys() as $k) {

					if(preg_match('/^' . $name . '\\[(.*?)\\]$/', $k, $m)) {

						if(isset($this->elements[$name][$m[1]]) && $this->elements[$name][$m[1]]->canSubmit()) {

							$this->clickedSubmit = $this->elements[$name][$m[1]];
							return $this->clickedSubmit;

						}
					}

				}

				foreach($e as $k => $ee) {

					if(
						$ee instanceof ImageElement &&
						($arr = $this->requestValues->get($name . '_x')) &&
						isset($arr[$k])
					) {
						$this->clickedSubmit = $ee;
						return $ee;
					}

					else if(
						$ee->canSubmit() &&
						($arr = $this->requestValues->get($name)) &&
						isset($arr[$k])
					) {
						$this->clickedSubmit = $ee;
						return $ee;
					}
				}
			}

			else if($e instanceof ImageElement && !is_null($this->requestValues->get($name . '_x'))) {
				$this->clickedSubmit = $e;
				return $e;
			}
			else if($e->canSubmit() && !is_null($this->requestValues->get($name))) {
				$this->clickedSubmit = $e;
				return $e;
			}

		}
	}
410474
function getRange() {
  const selection = window.getSelection();
  let range;

  if (selection && selection.rangeCount) {
    range = selection.getRangeAt(0).cloneRange();
  } else {
    range = document.createRange();
    range.selectNodeContents(this.preview.$el[0]);
    range.collapse(true);
  }

  return range;
}
212698
public static function getLastElement(array &$inputArray, $removeElement=false)
    {
        if (count($inputArray) > 0)
        {
            if (!$removeElement)
            {
                $element = end($inputArray);
            }
            else
            {
                $element = array_pop($inputArray);
            }
        }
        else
        {
            throw new \Exception('inputArray has no elements');
        }
        
        return $element;
    }
1016898
public static function getRangeAll()
    {
        $sheetObj = self::validSheetObj();
        
        return self::num2alpha(self::$_offsetCol+1). '1:'. $sheetObj->getHighestColumn(). $sheetObj->getHighestRow();
    }
546780
public function getElement()
    {
        if ($this->getDocblock()) {
            $this->setLines($this->getDocblock()->getElement());
            $this->addBlankLine();
        }
        if ($this->getNamespace()) {
            $this->addLine('namespace '.$this->getNamespace().';');
            $this->addBlankLine();
        }
        if (count($this->getUse()) > 0) {
            foreach ($this->getUse() as $alias => $class) {
                $line = 'use '.$class;
                if (is_string($alias)) {
                    $line .= ' as '.$alias;
                }
                $this->addLine($line.';');
            }
            $this->addBlankLine();
        }
        if ($this->getName()) {
            $this->addLine(
                ($this->isAbstract() ? 'abstract ' : '').'class '.$this->getName()
            );
        }
        if ($this->getExtends()) {
            $this->addLine(array('extends '.$this->getExtends()));
        }
        if (count($this->getImplements()) > 0) {
            $this->addLine(array('implements '.implode(', ', $this->getImplements())));
        }
        $this->startBlock();
        $this->addLine($this->getParams());
        $this->addLine($this->getFunctions());
        $this->endBlock();
        return $this->getLines();
    }
1068519
protected Element[] getElements(Element base, String childTag) {
		NodeList nodeList = base.getElementsByTagName(childTag);
		if (nodeList.getLength() == 0) {
			return null;
		}
		Element[] elements = new Element[nodeList.getLength()];
		for (int i=0; i<nodeList.getLength(); i++) {
		    elements[i] = (Element) nodeList.item(i);
		}
		return elements;
	}
1242222
private function findElement() {

        // Keep looping while we look for the set element
        while($this->getStream()){

            $streamLength = mb_strlen($this->stream);
            // Check to make sure that we do not miss the string because it has been broken in half.
            if($streamLength > mb_strlen($this->loader->getElement()) && $streamLength > (3 * $this->loader->getBytes())) {
                $this->stream = substr($this->stream, $this->loader->getBytes());
            }

            $found_element = strpos($this->stream, $this->loader->getElement());

            if($found_element !== false) {
                return $this->trimStream();
            }
        }

        $this->arrayEnd = true;
        return false;
    }
636184
@Override
    public synchronized Enumeration getSubContexts() {
        Enumeration e = mySubContexts.elements();
        class Adapter implements Enumeration {
            Enumeration base;

            public Adapter(Enumeration e) {
                this.base = e;
            }

            @Override
            public boolean hasMoreElements() {
                return base.hasMoreElements();
            }

            @Override
            public Object nextElement() {
                return ((Entry) base.nextElement()).getCtx();
            }
        }
        return new Adapter(e);
    }
382677
public function filterRange($range)
    {
        if (is_int($range)) {
            $level = $range;
            $depth = 0;
        } else {
            reset($range);
            $level = key($range);
            $depth = current($range);
        }

        if (1 === $level) {
            $nodeList = $this->xp->query('/descendant-or-self::*[ name() = "ul" and count( ancestor-or-self::ul ) >= '.$level.'  ]')->item(0);
        } else {
            $nodeList = $this->xp->query('/descendant-or-self::*[ name() = "ul" and count( ancestor-or-self::ul ) >= '.$level.' and ( descendant-or-self::*[ contains(@class, "open") or contains(@class, "active") ] or ancestor-or-self::*[ contains(@class, "open")  or contains(@class, "active") ] ) ]')->item(0);
        }

        if (!$nodeList) {
            return false;
        }

        if (false === $depth) {
            return $nodeList;
        }

        $depthNodelist = $this->xp->query('./descendant::*[ name() = "ul" and count( ancestor-or-self::ul ) > '.($level + $depth).' ]', $nodeList);

        foreach ($depthNodelist as $node) {
            $node->parentNode->removeChild($node);
        }

        if ($nodeList) {
            return $nodeList;
        } else {
            return false;
        }
    }
1335647
public Object getNextElement() {
        Object element = null;
        while (currentIndex+1 < endIndex && element == null) {
            currentIndex++;
            element = getElement();
        }
        return element;      
    }
326244
function getRange(node) {
    if (isScope(node)) {
        return node.nodes
            .map(getRange)
            .reduce(reduceRanges);
    } else if (node.type === 'rule') {
        return specificity.calculate(node.selector)
            .map(result => {
                return result.specificity.split(',').map(v => Number(v));
            })
            .reduce(reduceRange, Object.assign({}, DEFAULT_RANGE));
    }
    return null;
}