public function createStory($config = array())
    {
        $config = new AnConfig($config);

        $config->append(array(
            'subject' => get_viewer(),
            'owner' => get_viewer(),
            'component' => 'com_'.$this->_mixer->getIdentifier()->package,
        ));

        $story = $this->getService('repos:stories.story')->create($config->toArray());

        $story->save();

        return $story;
    }
public function createStory($config = array())
    {
        $config = new AnConfig($config);

        $config->append(array(
            'subject' => get_viewer(),
            'owner' => get_viewer(),
            'component' => 'com_'.$this->_mixer->getIdentifier()->package,
        ));

        $story = $this->getService('repos:stories.story')->create($config->toArray());

        $story->save();

        return $story;
    }
public function createStory ( $ config = array ( ) ) { $ config = new AnConfig ( $ config ) ; $ config -> append ( array ( 'subject' => get_viewer ( ) , 'owner' => get_viewer ( ) , 'component' => 'com_' . $ this -> _mixer -> getIdentifier ( ) -> package , ) ) ; $ story = $ this -> getService ( 'repos:stories.story' ) -> create ( $ config -> toArray ( ) ) ; $ story -> save ( ) ; return $ story ; }
Creates a story.

@param array|AnCommandContext $config Config. Can be a story data or AnCommandContext if the method
is used as a callback

@return ComStoriesDomainEntityStory
Creates a story .