2014-05-03 18:09:31 +02:00
|
|
|
<?php
|
2014-05-03 22:18:41 +02:00
|
|
|
class EditPostJob extends AbstractPostJob
|
2014-05-03 18:09:31 +02:00
|
|
|
{
|
|
|
|
public function execute()
|
|
|
|
{
|
|
|
|
$post = $this->post;
|
|
|
|
|
|
|
|
$subJobs =
|
|
|
|
[
|
|
|
|
new EditPostSafetyJob(),
|
|
|
|
new EditPostTagsJob(),
|
|
|
|
new EditPostSourceJob(),
|
|
|
|
new EditPostRelationsJob(),
|
|
|
|
new EditPostContentJob(),
|
|
|
|
new EditPostUrlJob(),
|
|
|
|
new EditPostThumbJob(),
|
|
|
|
];
|
|
|
|
|
|
|
|
foreach ($subJobs as $subJob)
|
|
|
|
{
|
|
|
|
$args = $this->getArguments();
|
|
|
|
$args[self::POST_ID] = $post->id;
|
|
|
|
try
|
|
|
|
{
|
|
|
|
Api::run($subJob, $args);
|
|
|
|
}
|
|
|
|
catch (ApiMissingArgumentException $e)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return $post;
|
|
|
|
}
|
|
|
|
}
|