Get the custom parameters for a plugin

@param   integer  $oid      Object ID (eg, group ID)
@param   string   $folder   Plugin folder
@param   string   $element  Plugin name
@return  object
549517
public static function getCustomParams($oid=null, $folder=null, $element=null)
	{
		$result = self::oneByPlugin($oid, $folder, $element);

		return new Registry($result->get('params'));
	}
1153437
public function getExtension($element, $type = 'component', $group = null)
    {
        $db = JFactory::getDbo();
        $sql = "SELECT `extension_id` AS `id`, `state` FROM `#__extensions`"
                ." WHERE `element` = ".$db->quote($element)." AND `type` = ".$db->quote($type);

        if ($type == 'plugin' && !empty($group)) {
            $sql .= ' AND `folder` =' . $db->quote($group);
        }

        $extension = $db->setQuery($sql)->loadObject();

        if ($extension && $extension->state != -1); {
            return $extension;
        }

        return false;
    }
952001
function initElement(\HTML_QuickForm2_Node $element) {
        \Debugbar::addMessage(($this->namespace ? $this->namespace . '::' : '') . 'models/' . $this->model->getEntity() . '.' . $element->getName());
        $config = \Config::get(($this->namespace ? $this->namespace . '::' : '') . 'models/' . $this->model->getEntity() . '.' . $element->getName());
        if (is_array($config)) {
            foreach ($config as $k => $v) {
                $method = \Str::camel('set_' . $k);
                if (is_callable([$element, $method])) {
                    call_user_func([$element, $method], $v);
                }
            }
        }
        return $element;
    }
886118
public function getEntityForElement( $element )
	{
		if ( isset( $element['contextRef'] ) )
		{
			return $this->contexts[ $element['contextRef'] ]['entity']['identifier']['value'];
		}

		if ( isset( $element['tuple_elements'] ) )
		{
			foreach ( $element['tuple_elements'] as $elementKey => $tuple_elements )
			{
				foreach ( $tuple_elements as $tupleIndex => $tuple_element )
				{
					$result = $this->getEntityForElement( $tuple_element );
					if ( $result ) return $result;
				}
			}
		}

		throw new Exception( "The element '{$element['taxonomy_element']['id']}' has no context ref but also has no tuple members (getEntityForElement)" );
	}
1152155
private function createElement($element)
    {
        if ($element instanceof FilterElementInformationInterface) {
            $panelElement = new DefaultFilterElement();
            return $panelElement->setPropertyName($element->getPropertyName());
        }
        if ($element instanceof LimitElementInformationInterface) {
            return new DefaultLimitElement();
        }
        if ($element instanceof SearchElementInformationInterface) {
            return $this->buildSearchElement($element);
        }
        if ($element instanceof SortElementInformationInterface) {
            return new DefaultSortElement();
        }
        if ($element instanceof SubmitElementInformationInterface) {
            return new DefaultSubmitElement();
        }

        return null;
    }
1151990
public function get(& $transport, $options = array (), $element = null) {
        $object = null;
        $element = parent :: get($transport, $options, $element);
        if (isset ($element['class']) && isset ($element['object'])) {
            $vClass = $element['class'];
            if (!empty ($element['package'])) {
                $pkgPrefix = $element['package'];
                $pkgKeys = array_keys($transport->xpdo->packages);
                if ($pkgFound = in_array($pkgPrefix, $pkgKeys)) {
                    $pkgPrefix = '';
                }
                elseif ($pos = strpos($pkgPrefix, '.')) {
                    $prefixParts = explode('.', $pkgPrefix);
                    $prefix = '';
                    foreach ($prefixParts as $prefixPart) {
                        $prefix .= $prefixPart;
                        $pkgPrefix = substr($pkgPrefix, $pos +1);
                        if ($pkgFound = in_array($prefix, $pkgKeys))
                            break;
                        $prefix .= '.';
                        $pos = strpos($pkgPrefix, '.');
                    }
                    if (!$pkgFound)
                        $pkgPrefix = $element['package'];
                }
                $vClass = (!empty ($pkgPrefix) ? $pkgPrefix . '.' : '') . $vClass;
            }
            $object = $transport->xpdo->newObject($vClass);
            if (is_object($object) && $object instanceof xPDOObject) {
                $options = array_merge($options, $element);
                $setKeys = false;
                if (isset ($options[xPDOTransport::PRESERVE_KEYS])) {
                    $setKeys = (boolean) $options[xPDOTransport::PRESERVE_KEYS];
                }
                $object->fromJSON($element['object'], '', $setKeys, true);
            }
        }
        return $object;
    }
1013251
private function parseParameters(\DOMDocument $xml, $file)
    {
        if ($parameters = $this->getChildren($xml->documentElement, 'parameters')) {
            $this->container->getParameterBag()->add($this->getArgumentsAsPhp($parameters[0], 'parameter', $file));
        }
    }
1000668
public static function toDOM(BaseElement $element): \DOMDocument
    {
        $doc = new \DOMDocument('1.0', 'utf-8');
        $doc->appendChild($element->toDOM($doc));
        return $doc;
    }
146187
private function elementToRdf(JsonObject $element)
    {
        if (property_exists($element, '@value')) {
            return Value::fromJsonLd($element);
        }

        $iri = new IRI($element->{'@id'});

        return $iri->isAbsolute() ? $iri : null;
    }
1010708
protected function getNode(ObjectId $oid) {
    $oidStr = $oid->__toString();
    if (!isset($this->deserializedNodes[$oidStr])) {
      $persistenceFacade = ObjectFactory::getInstance('persistenceFacade');
      $type = $oid->getType();
      if ($persistenceFacade->isKnownType($type)) {
        // don't create all values by default (-> don't use PersistenceFacade::create() directly, just for determining the class)
        $class = get_class($persistenceFacade->create($type, BuildDepth::SINGLE));
        $node = new $class;
      }
      else {
        $node = new Node($type);
      }
      $node->setOID($oid);
      $this->deserializedNodes[$oidStr] = $node;
    }
    return $this->deserializedNodes[$oidStr];
  }
1062583
public static function fromRawString(string $oid, bool $critical,
        string $data): self
    {
        $obj = new self($oid, $critical, new OctetString(''));
        $obj->_element = null;
        $obj->_data = $data;
        return $obj;
    }
526082
public static function getDefaultParams($folder=null, $element=null)
	{
		$plugin = \Plugin::byType($folder, $element);

		return new Registry($plugin->params);
	}
202702
protected function identify($element): string
    {
        if (is_string($element)) {
            return $this->driver->identifier($element);
        }

        if (!$element instanceof ElementInterface && !$element instanceof AbstractTable) {
            throw new InvalidArgumentException("Invalid argument type");
        }

        return $this->driver->identifier($element->getName());
    }
465240
public function getPluginById($id)
    {
        foreach ($this->plugins as $plugin) {
            if ($plugin::getPluginId() == $id) {
                return $plugin;
            }
        }
    }
467480
public function getTopOrganizationElement()
    {
        $element = $this->getElement($this->topOrganizationFieldName);
        $orgId   = $this->getCurrentTopOrganizationId();
        $orgs    = $this->getTopOrganizations();
        $hidden  = $this->_organizationFromUrl || (count($orgs) < 2);

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

        if ($hidden) {
            if (! $element instanceof \Zend_Form_Element_Hidden) {
                $element = new \Zend_Form_Element_Hidden($this->topOrganizationFieldName);
                $this->addElement($element);
            }

            $orgIds = array_keys($orgs);
            $orgId  = reset($orgIds);

            $element->setValue($orgId);

        } elseif (! $element instanceof \Zend_Form_Element_Select) {
            $element = new \Zend_Form_Element_Select($this->topOrganizationFieldName);
            $element->setLabel($this->topOrganizationDescription);
            $element->setRegisterInArrayValidator(true);
            $element->setRequired(true);
            $element->setMultiOptions($orgs);
            $element->setAttrib('onchange', 'this.form.submit();');

            if ($this->organizationMaxLines > 1) {
                $element->setAttrib('size', min(count($orgs) + 1, $this->organizationMaxLines));
            }
            $element->setValue($orgId);
        }
        $this->addElement($element);

        return $element;
    }
61937
private static function parseOidString($oid) {
    if (strlen($oid) == 0) {
      return null;
    }

    $oidParts = preg_split(self::getDelimiterPattern(), $oid);
    if (sizeof($oidParts) < 2) {
      return null;
    }

    if (self::$idPattern == null) {
      self::$idPattern = '/^[0-9]*$|^'.self::$dummyIdPattern.'$/';
    }

    // get the ids from the oid
    $ids = [];
    $nextPart = array_pop($oidParts);
    while($nextPart !== null && preg_match(self::$idPattern, $nextPart) == 1) {
      $intNextPart = (int)$nextPart;
      if ($nextPart == (string)$intNextPart) {
        $ids[] = $intNextPart;
      }
      else {
        $ids[] = $nextPart;
      }
      $nextPart = array_pop($oidParts);
    }
    $ids = array_reverse($ids);

    // get the type
    $type = $nextPart;

    // get the prefix
    $prefix = join(self::DELIMITER, $oidParts);

    return [
      'type' => $type,
      'id' => $ids,
      'prefix' => $prefix
    ];
  }
1094696
public function parseElement(Node $parent, \DOMElement $element)
    {
        foreach ($this->registry[ElementExtension::class] as $extension) {
            $node = $extension->parseElement($parent, $element);
            if ($node) {
                return $node;
            }
        }

        return null;
    }