Page MenuHomePhorge

DoorkeeperAsanaRemarkupRule.php
No OneTemporary

Size
739 B
Referenced Files
None
Subscribers
None

DoorkeeperAsanaRemarkupRule.php

<?php
final class DoorkeeperAsanaRemarkupRule
extends DoorkeeperRemarkupRule {
public function apply($text) {
return preg_replace_callback(
'@https://app\\.asana\\.com/0/(\\d+)/(\\d+)@',
array($this, 'markupAsanaLink'),
$text);
}
public function markupAsanaLink($matches) {
return $this->addDoorkeeperTag(
array(
'href' => $matches[0],
'tag' => array(
'ref' => array(
DoorkeeperBridgeAsana::APPTYPE_ASANA,
DoorkeeperBridgeAsana::APPDOMAIN_ASANA,
DoorkeeperBridgeAsana::OBJTYPE_TASK,
$matches[2],
),
'extra' => array(
'asana.context' => $matches[1],
),
),
));
}
}

File Metadata

Mime Type
text/x-php
Expires
Wed, May 7, 10:20 AM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
87512
Default Alt Text
DoorkeeperAsanaRemarkupRule.php (739 B)

Event Timeline