Dear customers! We have updated our Privacy Policy: . An updated version of our Privacy Policy takes eff ect on May 25, 2018.

Topvisor SDK::Fields

Additional class to manage data fields.

Class methods

  • static genFilterData($name, $operator, $values) - returns an array of the filter elements
  • static genOrderData($name, $direction) - returns an array of the sorting elements

  • $name - filed name
  • $operator - comparison operator
  • $values - values operator
  • $direction - sorting order (ASC or DESC)

Example

<?php //... $selectorKeywords = new TV\Pen($Session, 'get', 'keywords_2', 'keywords'); // add 3 filters $selectorKeywords->setFilters([ TV\Fields::genFilterData('name', 'CONTAIN', ['а']), // keyword with an "a" letter TV\Fields::genFilterData('tags', 'IN', [1, 2]), // keyword with a 1 or 2 tag TV\Fields::genFilterData('target', 'NOT_EQUALS', ['']) // keyword has a target link ]); // sort keywords alphabetically $selectorKeywords->serOrders([ TV\Fields::genOrderData('name', 'ASC') ]); //...