ProductVariation::onBeforeWrite PHP 메소드

onBeforeWrite() 공개 메소드

Save selected attributes - somewhat of a hack.
public onBeforeWrite ( )
    public function onBeforeWrite()
    {
        parent::onBeforeWrite();
        if (isset($_POST['ProductAttributes']) && is_array($_POST['ProductAttributes'])) {
            $this->AttributeValues()->setByIDList(array_values($_POST['ProductAttributes']));
        }
    }