Skip to content

Conversation

@dsuela
Copy link

@dsuela dsuela commented Jun 12, 2013

New command to update some content metadata (owner, published date and modification date).

Copy link
Contributor

@andrerom andrerom left a 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' ),
Copy link
Contributor

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' ),
Copy link
Contributor

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' ),
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants