public function cloneTo(DataObjectScaffolder $target)
    {
        $inst = $target->getDataObjectInstance();

        foreach ($this->getFields() as $field) {
            if (StaticSchema::inst()->isValidFieldName($inst, $field->Name)) {
                $target->addField($field->Name, $field->Description);
            }
        }
        foreach ($this->getOperations() as $op) {
            $identifier = OperationScaffolder::getIdentifier($op);
            $target->operation($identifier);
        }

        return $target;
    }
public function cloneTo(DataObjectScaffolder $target)
    {
        $inst = $target->getDataObjectInstance();

        foreach ($this->getFields() as $field) {
            if (StaticSchema::inst()->isValidFieldName($inst, $field->Name)) {
                $target->addField($field->Name, $field->Description);
            }
        }
        foreach ($this->getOperations() as $op) {
            $identifier = OperationScaffolder::getIdentifier($op);
            $target->operation($identifier);
        }

        return $target;
    }
public function cloneTo ( DataObjectScaffolder $ target ) { $ inst = $ target -> getDataObjectInstance ( ) ; foreach ( $ this -> getFields ( ) as $ field ) { if ( StaticSchema :: inst ( ) -> isValidFieldName ( $ inst , $ field -> Name ) ) { $ target -> addField ( $ field -> Name , $ field -> Description ) ; } } foreach ( $ this -> getOperations ( ) as $ op ) { $ identifier = OperationScaffolder :: getIdentifier ( $ op ) ; $ target -> operation ( $ identifier ) ; } return $ target ; }
Clones this scaffolder to another class, copying over only valid fields and operations
@param DataObjectScaffolder $target
@return DataObjectScaffolder
Clones this scaffolder to another class copying over only valid fields and operations