You are here

public function QueryPath::before in QueryPath 7.3

Same name and namespace in other branches
  1. 6 QueryPath/QueryPath.php \QueryPath::before()
  2. 7.2 QueryPath/QueryPath.php \QueryPath::before()
1 call to QueryPath::before()
QueryPath::textBefore in QueryPath/QueryPath.php

File

QueryPath/QueryPath.php, line 690

Class

QueryPath

Code

public function before($data) {
  $data = $this
    ->prepareInsert($data);
  foreach ($this->matches as $m) {
    $ins = $data
      ->cloneNode(TRUE);
    $m->parentNode
      ->insertBefore($ins, $m);
  }
  return $this;
}