src/FlexiPeeHP/Stitek.php
public function createNew($name, $evidences, $options = [])
    {
        $this->setData($options, true);
        $evidence2code = array_flip(self::$vsbToEvidencePath);
        foreach ($evidences as $evidence) {
            if (array_key_exists($evidence, $evidence2code)) {
                $this->setDataValue($evidence2code[$evidence], true);
            }
        }

        if (!array_key_exists('kod', $options)) {
            $this->setDataValue('kod', self::code($name));
        }
        $this->setDataValue('nazev', $name);
        return $this->sync();
    }
public function createNew($name, $evidences, $options = [])
    {
        $this->setData($options, true);
        $evidence2code = array_flip(self::$vsbToEvidencePath);
        foreach ($evidences as $evidence) {
            if (array_key_exists($evidence, $evidence2code)) {
                $this->setDataValue($evidence2code[$evidence], true);
            }
        }

        if (!array_key_exists('kod', $options)) {
            $this->setDataValue('kod', self::code($name));
        }
        $this->setDataValue('nazev', $name);
        return $this->sync();
    }
public function createNew ( $ name , $ evidences , $ options = [ ] ) { $ this -> setData ( $ options , true ) ; $ evidence2code = array_flip ( self :: $ vsbToEvidencePath ) ; foreach ( $ evidences as $ evidence ) { if ( array_key_exists ( $ evidence , $ evidence2code ) ) { $ this -> setDataValue ( $ evidence2code [ $ evidence ] , true ) ; } } if ( ! array_key_exists ( 'kod' , $ options ) ) { $ this -> setDataValue ( 'kod' , self :: code ( $ name ) ) ; } $ this -> setDataValue ( 'nazev' , $ name ) ; return $ this -> sync ( ) ; }
Create New Label for given evidencies

@param string $name       Label Name
@param array  $evidences  Evidence code list ex: ['faktura-vydana','faktura-prijata']
@param array  $options    Additional Label properties ex: ['kod'=>'EXAMPLE','skupVybKlic'=>'SKUPINA_STITKU']

@return boolean success
Create New Label for given evidencies