@@ 1126-1134 (lines=9) @@ | ||
1123 | * @param string $urlaction |
|
1124 | * @return array |
|
1125 | */ |
|
1126 | static function makeUrlDetails( $name, $urlaction = '' ) { |
|
1127 | $title = Title::newFromText( $name ); |
|
1128 | self::checkTitle( $title, $name ); |
|
1129 | ||
1130 | return [ |
|
1131 | 'href' => $title->getLocalURL( $urlaction ), |
|
1132 | 'exists' => $title->isKnown(), |
|
1133 | ]; |
|
1134 | } |
|
1135 | ||
1136 | /** |
|
1137 | * Make URL details where the article exists (or at least it's convenient to think so) |
|
@@ 1142-1150 (lines=9) @@ | ||
1139 | * @param string $urlaction |
|
1140 | * @return array |
|
1141 | */ |
|
1142 | static function makeKnownUrlDetails( $name, $urlaction = '' ) { |
|
1143 | $title = Title::newFromText( $name ); |
|
1144 | self::checkTitle( $title, $name ); |
|
1145 | ||
1146 | return [ |
|
1147 | 'href' => $title->getLocalURL( $urlaction ), |
|
1148 | 'exists' => true |
|
1149 | ]; |
|
1150 | } |
|
1151 | ||
1152 | /** |
|
1153 | * make sure we have some title to operate on |
@@ 806-814 (lines=9) @@ | ||
803 | /** |
|
804 | * @todo is this even used? |
|
805 | */ |
|
806 | function makeArticleUrlDetails( $name, $urlaction = '' ) { |
|
807 | $title = Title::newFromText( $name ); |
|
808 | $title = $title->getSubjectPage(); |
|
809 | self::checkTitle( $title, $name ); |
|
810 | return [ |
|
811 | 'href' => $title->getLocalURL( $urlaction ), |
|
812 | 'exists' => $title->exists(), |
|
813 | ]; |
|
814 | } |
|
815 | ||
816 | /** |
|
817 | * a structured array of links usually used for the tabs in a skin |