-
Notifications
You must be signed in to change notification settings - Fork 23
Update content metadata command. #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
andrerom
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides needs for fixing the inline text here it looks good.
But I would make one change to the logic, make all meta data fields optional and just make sure at least one is specified before doing the update.
(implies the values set on $contentMetadataUpdateStruct should be conditional)
| $this->setName( 'ezpublish:cookbook:update_content_metadata' )->setDefinition( | ||
| array( | ||
| new InputArgument( 'contentId' , InputArgument::REQUIRED, 'the content to be updated' ), | ||
| new InputArgument( 'newOwnerId' , InputArgument::REQUIRED, 'the new title of the content' ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the new title of the content => new owner for the content
Also should be made optional
| array( | ||
| new InputArgument( 'contentId' , InputArgument::REQUIRED, 'the content to be updated' ), | ||
| new InputArgument( 'newOwnerId' , InputArgument::REQUIRED, 'the new title of the content' ), | ||
| new InputArgument( 'newModificationDate' , InputArgument::REQUIRED, 'the new body of the content' ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the new body of the content => new modification date for the content
Also should be made optional
| new InputArgument( 'contentId' , InputArgument::REQUIRED, 'the content to be updated' ), | ||
| new InputArgument( 'newOwnerId' , InputArgument::REQUIRED, 'the new title of the content' ), | ||
| new InputArgument( 'newModificationDate' , InputArgument::REQUIRED, 'the new body of the content' ), | ||
| new InputArgument( 'newPublishedDate' , InputArgument::REQUIRED, 'the new body of the content' ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the new body of the content => new publish date for the content
Also should be made optional
New command to update some content metadata (owner, published date and modification date).