multiple.stub 319 B

12345678
  1. public function {%methodName%}($value, $data)
  2. {
  3. $value = $value ? $value : (isset($data['{%field%}']) ? $data['{%field%}'] : '');
  4. $valueArr = explode(',', $value);
  5. $list = $this->{%listMethodName%}();
  6. return implode(',', array_intersect_key($list, array_flip($valueArr)));
  7. }