src/Service/NT8PropertyService.php
public function getAttributeDataFromTabs(array $limit = []) {
    $api_root_data = json_decode($this->nt8RestService->get('/'));
    $attrib_data = $api_root_data->constants->attributes;

    if (count($limit) > 0) {
      $attrib_data = array_filter($attrib_data, function ($value) use ($limit) {
        $attr_code = $value->code ?: '';
        if (in_array($attr_code, $limit)) {
          return TRUE;
        }

        return FALSE;
      });
    }

    return $attrib_data;
  }
public function getAttributeDataFromTabs(array $limit = []) {
    $api_root_data = json_decode($this->nt8RestService->get('/'));
    $attrib_data = $api_root_data->constants->attributes;

    if (count($limit) > 0) {
      $attrib_data = array_filter($attrib_data, function ($value) use ($limit) {
        $attr_code = $value->code ?: '';
        if (in_array($attr_code, $limit)) {
          return TRUE;
        }

        return FALSE;
      });
    }

    return $attrib_data;
  }
public function getAttributeDataFromTabs ( array $ limit = [ ] ) { $ api_root_data = json_decode ( $ this -> nt8RestService -> get ( '/' ) ) ; $ attrib_data = $ api_root_data -> constants -> attributes ; if ( count ( $ limit ) > 0 ) { $ attrib_data = array_filter ( $ attrib_data , function ( $ value ) use ( $ limit ) { $ attr_code = $ value -> code ? : '' ; if ( in_array ( $ attr_code , $ limit ) ) { return TRUE ; } return FALSE ; } ) ; } return $ attrib_data ; }
Fetches data for the specified attributes from Tabs.

@param array $limit
Limit the returned results by attribute code.
Example: $limit = [ 'ATTR01', 'ATTR02' ]
This will only return data for those attributes from the API.
If an empty array is passed all of the data will be returned.

@return array
Data for each attribute contained in an array.
Fetches data for the specified attributes from Tabs .