11<?php declare ( strict_types=1 );
22
3- namespace lloc \Msls ;
3+ namespace lloc \Msls \ Admin ;
44
55use lloc \Msls \Component \Component ;
66use lloc \Msls \Component \Icon \IconSvg ;
1111 *
1212 * @package Msls
1313 */
14- class MslsAdminIcon {
14+ class Icon {
1515
1616 protected string $ icon_type = 'action ' ;
1717 protected string $ language = '' ;
@@ -40,7 +40,7 @@ public function __toString(): string {
4040 }
4141
4242 /**
43- * @return MslsAdminIcon|MslsAdminIconTaxonomy
43+ * @return Icon|IconTaxonomy
4444 */
4545 public static function create ( ?string $ type = null ) {
4646 $ obj = msls_content_types ();
@@ -49,13 +49,13 @@ public static function create( ?string $type = null ) {
4949 $ type = $ obj ->get_request ();
5050 }
5151
52- return $ obj ->is_taxonomy () ? new MslsAdminIconTaxonomy ( $ type ) : new MslsAdminIcon ( $ type );
52+ return $ obj ->is_taxonomy () ? new IconTaxonomy ( $ type ) : new Icon ( $ type );
5353 }
5454
5555 /**
5656 * Set the icon path
5757 */
58- public function set_icon_type ( string $ icon_type ): MslsAdminIcon {
58+ public function set_icon_type ( string $ icon_type ): Icon {
5959 $ this ->icon_type = $ icon_type ;
6060
6161 return $ this ;
@@ -64,7 +64,7 @@ public function set_icon_type( string $icon_type ): MslsAdminIcon {
6464 /**
6565 * Set the path by type
6666 */
67- public function set_path (): MslsAdminIcon {
67+ public function set_path (): Icon {
6868 if ( 'post ' !== $ this ->type ) {
6969 $ query_vars = array ( 'post_type ' => $ this ->type );
7070 $ this ->path = add_query_arg ( $ query_vars , $ this ->path );
@@ -73,19 +73,19 @@ public function set_path(): MslsAdminIcon {
7373 return $ this ;
7474 }
7575
76- public function set_language ( string $ language ): MslsAdminIcon {
76+ public function set_language ( string $ language ): Icon {
7777 $ this ->language = $ language ;
7878
7979 return $ this ;
8080 }
8181
82- public function set_src ( string $ src ): MslsAdminIcon {
82+ public function set_src ( string $ src ): Icon {
8383 $ this ->src = $ src ;
8484
8585 return $ this ;
8686 }
8787
88- public function set_href ( int $ id ): MslsAdminIcon {
88+ public function set_href ( int $ id ): Icon {
8989 $ this ->href = get_edit_post_link ( $ id ) ?? '' ;
9090
9191 return $ this ;
@@ -94,7 +94,7 @@ public function set_href( int $id ): MslsAdminIcon {
9494 /**
9595 * Sets the id of the object this icon is for
9696 */
97- public function set_id ( int $ id ): MslsAdminIcon {
97+ public function set_id ( int $ id ): Icon {
9898 $ this ->id = $ id ;
9999
100100 return $ this ;
@@ -103,7 +103,7 @@ public function set_id( int $id ): MslsAdminIcon {
103103 /**
104104 * Sets the origin language for this icon
105105 */
106- public function set_origin_language ( string $ origin_language ): MslsAdminIcon {
106+ public function set_origin_language ( string $ origin_language ): Icon {
107107 $ this ->origin_language = $ origin_language ;
108108
109109 return $ this ;
0 commit comments