src/wcmf/lib/model/NodeUtil.php
public static function removeNonDisplayValues(Node $node) {
    $displayValues = $node->getProperty('displayValues');
    $valueNames = $node->getValueNames();
    foreach($valueNames as $name) {
      if (!in_array($name, $displayValues)) {
        $node->removeValue($name);
      }
    }
  }
public static function removeNonDisplayValues(Node $node) {
    $displayValues = $node->getProperty('displayValues');
    $valueNames = $node->getValueNames();
    foreach($valueNames as $name) {
      if (!in_array($name, $displayValues)) {
        $node->removeValue($name);
      }
    }
  }
public static function removeNonDisplayValues ( Node $ node ) { $ displayValues = $ node -> getProperty ( 'displayValues' ) ; $ valueNames = $ node -> getValueNames ( ) ; foreach ( $ valueNames as $ name ) { if ( ! in_array ( $ name , $ displayValues ) ) { $ node -> removeValue ( $ name ) ; } } }
Remove all values from a Node that are not a display value.
@param $node The Node instance
Remove all values from a Node that are not a display value .