Create an activity record

@param  string $description
@return  Activity
494042
public function log($description = '')
    {
        $payload = [
            'user_id' => auth()->id(),
            'description' => $description,
            'request' => json_encode([
                'url' => request()->url(),
                'method' => request()->method(),
                'query' => request()->fullUrl(),
                'secure' => request()->secure(),
                'client_ip' => request()->ip(),
                'payload' => request()->all(),
            ]),
        ];

        return $this->model->create($payload);
    }
905300
public function createSnapshot($vpsName, $description)
    {
        return $this->getSoapClient(array_merge(array($vpsName, $description), array('__method' => 'createSnapshot')))->createSnapshot($vpsName, $description);
    }
82721
public function setDescription($description)
    {
        $stripURLRegex = "/((?<!=\")(http|ftp)+(s)?:\/\/[^<>()\s]+)/i";
        $description = preg_replace($stripURLRegex, '', $description);
        $description = strip_tags($description);
        $description = htmlentities($description);
        $description = str_replace(array('#', '@'), '', $description);
        $description = AnService::get('com:base.template.helper.text')->truncate($description, array('length' => 160));
        $description = trim($description);

        $this->_description = $description;
	}
181310
public function setPermission($name, $description = null)
    {
        $permission = $this->getPermission($name) ?: $this->createPermission($name);
        if ($description) {
            $permission->description = $description;
        }
        $this->add($permission);

        return $permission;
    }
889325
public function createScope($scope, $description = null)
    {
        if ($scopeObject = $this->findScopeByScope($scope)) {
          return $scopeObject;
        }

        $scopeObject = new \OAuth2\ServerBundle\Entity\Scope();
        $scopeObject->setScope($scope);
        $scopeObject->setDescription($description);

        // Store Scope
        $this->em->persist($scopeObject);
        $this->em->flush();

        return $scopeObject;
    }
64720
public function create(Description $description)
    {
        return new LocationEntity(
            $description->getOptionalProperty('address'),
            $this->getCoordinates($description),
            $description->getOptionalProperty('postalCode'),
            $description->getOptionalProperty('city'),
            $description->getOptionalProperty('state'),
            $description->getOptionalProperty('country')
        );
    }
85783
public function recordActivity($event)
    {
        return chronicle()->record(
            $this,
            $this->getActivityName($event),
            $this->getUserId()
        );
    }
1168950
public function setVideoDescription($description)
    {
        $this->ensureMediaGroupIsNotNull();
        $this->getMediaGroup()->setDescription(
            new Zend_Gdata_Media_Extension_MediaDescription($description));
        return $this;
    }
966640
public function setDescription($id, $description)
    {
        return $this->put($this->getPath().'/'.rawurlencode($id).'/desc', array('value' => $description));
    }
750215
public function create(Description $description)
    {
        return new PhotoGroup(
            $description->getMandatoryProperty('name'),
            $description->getMandatoryProperty('type'),
            $this->getPhotos($description)
        );
    }
263897
public function video($mediaid = '', $title = '', $description = '')
    {
        $this->message = [
            'CreateTime'   => time(),
            'MsgType'      => 'video',
            'ToUserName'   => $this->getOpenid(),
            'FromUserName' => $this->getToOpenid(),
            'Video'        => [
                'Title'       => $title,
                'MediaId'     => $mediaid,
                'Description' => $description,
            ],
        ];
        return $this;
    }
480110
public function addDefinition(string $term, $description){
        $this->list[]   = [
            "term"          => $term,
            "description"   => array_filter(
                (array)$description,
                function($v){
                    return is_scalar($v)
                        || (is_object($v) && method_exists($v, "__toString"));
                }
            ),
        ];

        return $this;
    }
927877
public function setDescription($description)
    {
        $this->content = null;
        $this->parsedDescription = null;
        $this->description = trim($description);

        return $this;
    }
1347397
public function setDescription($description)
    {
        // clean and store description
        // if is false, set false
        $this->description = (false == $description) ? $description : strip_tags(htmlentities($description));

        return $this;
    }
925582
public function setDescription($description)
    {
        self::writeFullTag(
            $description,
            'description',
            false,
            'media:description',
            $this->validator,
            'validateDescription',
            $this->exception,
            'Provided description is not a valid value.'
        );

        return $this;
    }
1026600
public function description(string $description, int $maxLength = 250) : self
    {
        $description = trim(strip_tags($description));
        $description = preg_replace("/\r|\n/", '', $description);

        $length = mb_strlen($description);

        $description = mb_substr($description, 0, $maxLength);

        if (mb_strlen($description) < $length) {
            $description .= '...';
        }

        $this->forget('description');

        $this->tags[] = $this->createTag('description', $description);

        return $this;
    }
1008160
public function activityAction()
    {
        $filter = $this->getEvent()->getRouteMatch()->getParam('filter');
        $userId = $this->zfcUserAuthentication()->getIdentity()->getId();
        $user = $this->getServiceLocator()->get('playgrounduser_user_service')->getUserMapper()->findById($userId);
        $stories = $this->getStoryTellingService()->getStoryTellingMapper()->findWithStoryMappingByUser(
            $user,
            $filter
        );
        $total = count($stories);



        $activities = array();
        foreach ($stories as $story) {
            $matchToFilter = false || empty($filter);
            foreach ($story->getOpenGraphStoryMapping()->getStory()->getObjects() as $object) {
                if (strtolower($filter) == strtolower($object->getCode())) {
                    $matchToFilter = true;
                }
            }
            if ($matchToFilter) {
                $activities[] = array(
                  "object" => json_decode($story->getObject(), true),
                  "openGraphMapping" => $story->getOpenGraphStoryMapping()->getId(),
                  "hint"   => $story->getOpenGraphStoryMapping()->getHint(),
                  "activity_stream_text" => $story->getOpenGraphStoryMapping()->getActivityStream(),
                  "picto" => $story->getOpenGraphStoryMapping()->getPicto(),
                  "points" => $story->getPoints(),
                  'created_at' => $story->getCreatedAt(),
                  'definition' => $story->getOpenGraphStoryMapping()->getStory()->getDefinition(),
                  'label' => $story->getOpenGraphStoryMapping()->getStory()->getLabel()
                );
            }
        }

        if (is_array($activities)) {
            $paginator = new \Zend\Paginator\Paginator(new \Zend\Paginator\Adapter\ArrayAdapter($activities));
            $paginator->setItemCountPerPage(25);
            $paginator->setCurrentPageNumber($this->getEvent()->getRouteMatch()->getParam('p'));
        } else {
            $paginator = $activities;
        }

        $filters = $this->getObjectService()->getObjectMapper()->findAll();


        return new ViewModel(
            array(
                'stories' => $paginator,
                'filter'  => $filter,
                'filters' => $filters,
                'total' => $total
            )
        );
    }