processStatesArray example


  public static function rewriteStatesSelector(array &$elements$search$replace) {
    if (!empty($elements['#states'])) {
      foreach ($elements['#states'] as $state => $ids) {
        static::processStatesArray($elements['#states'][$state]$search$replace);
      }
    }
    foreach (Element::children($elements) as $key) {
      static::rewriteStatesSelector($elements[$key]$search$replace);
    }
  }

  /** * Helps recursively rewrite #states selectors. * * Not to be confused with self::processStates(), which just prepares states * for rendering. * * @param array $conditions * States conditions array. * @param string $search * A partial or entire jQuery selector string to replace in #states. * @param string $replace * The string to replace all instances of $search with. * * @see self::rewriteStatesSelector() */
Home | Imprint | This part of the site doesn't use cookies.