public function getAllChildren() {
    // Define as array.
    $options = [];

    // Fetch main categories.
    foreach (array_keys($this->getCategories()) as $category) {
      $options = array_merge($options, $this->getChildren($category));
    }
    // Return array.
    return $options;
  }
public function getAllChildren() {
    // Define as array.
    $options = [];

    // Fetch main categories.
    foreach (array_keys($this->getCategories()) as $category) {
      $options = array_merge($options, $this->getChildren($category));
    }
    // Return array.
    return $options;
  }
public function getAllChildren ( ) { // Define as array. $ options = [ ] ; // Fetch main categories. foreach ( array_keys ( $ this -> getCategories ( ) ) as $ category ) { $ options = array_merge ( $ options , $ this -> getChildren ( $ category ) ) ; } // Return array. return $ options ; }
Returns all the children of top level term items.

@return array
An array of child items.
Returns all the children of top level term items .