src/ngrest/base/Plugin.php
public function getNgShowCondition($ngModel)
    {
        preg_match_all('/{(.*?)}/', $this->condition, $matches, PREG_SET_ORDER);
        $search = [];
        $replace = [];
        foreach ($matches as $match) {
            $search[] = $match[0];
            $replace[] = $this->replaceFieldFromNgModelContext($ngModel, $match[1]);
        }
        
        return str_replace($search, $replace, $this->condition);
    }
public function getNgShowCondition($ngModel)
    {
        preg_match_all('/{(.*?)}/', $this->condition, $matches, PREG_SET_ORDER);
        $search = [];
        $replace = [];
        foreach ($matches as $match) {
            $search[] = $match[0];
            $replace[] = $this->replaceFieldFromNgModelContext($ngModel, $match[1]);
        }
        
        return str_replace($search, $replace, $this->condition);
    }
public function getNgShowCondition ( $ ngModel ) { preg_match_all ( '/{(.*?)}/' , $ this -> condition , $ matches , PREG_SET_ORDER ) ; $ search = [ ] ; $ replace = [ ] ; foreach ( $ matches as $ match ) { $ search [ ] = $ match [ 0 ] ; $ replace [ ] = $ this -> replaceFieldFromNgModelContext ( $ ngModel , $ match [ 1 ] ) ; } return str_replace ( $ search , $ replace , $ this -> condition ) ; }
Get the ng-show condition from a given ngModel context.

Evaluates the ng-show condition from a given ngModel context. A condition like
`{field} == true` would return `data.create.field == true`.

@param string $ngModel The ngModel to get the context informations from.
@return string Returns the condition with replaced field context like `data.create.fieldname == 0`
@since 1.2.0
Get the ng - show condition from a given ngModel context .