public function create($pid, $attrs = [])
    {
        if (isset($attrs['constants'])) {
            $attrs['constants'] = $this->parseTsConstants($attrs['constants']);
        }

        return parent::create($pid, $attrs);
    }
public function create($pid, $attrs = [])
    {
        if (isset($attrs['constants'])) {
            $attrs['constants'] = $this->parseTsConstants($attrs['constants']);
        }

        return parent::create($pid, $attrs);
    }
public function create ( $ pid , $ attrs = [ ] ) { if ( isset ( $ attrs [ 'constants' ] ) ) { $ attrs [ 'constants' ] = $ this -> parseTsConstants ( $ attrs [ 'constants' ] ) ; } return parent :: create ( $ pid , $ attrs ) ; }
Create a new template record.

You can pass $attrs['constants'] as a hash (constant => value), and it
will be correctly converted to string.

@param  int  $pid
@param  array  $attrs
@return  int|null
Create a new template record .