ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\Style\Content\Style\StyleManager Class Reference
+ Collaboration diagram for ILIAS\Style\Content\Style\StyleManager:

Public Member Functions

 __construct (protected InternalDataService $data, InternalRepoService $repo, protected InternalDomainService $domain, protected ResourceStakeholder $stakeholder, protected int $style_id)
 
 writeCss ()
 
 getPath (bool $add_random=true, bool $add_token=true)
 
 getResourceIdentification ()
 
 createContainerFromLocalZip (string $local_zip_path)
 
 createContainerFromLocalDir (string $local_dir_path, string $container_path="", bool $recursive=true)
 
 importFromUploadResult (UploadResult $result,)
 
 cloneResourceContainer (int $from_style_id)
 

Protected Attributes

StyleRepo $repo
 

Detailed Description

Definition at line 30 of file StyleManager.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Style\Content\Style\StyleManager::__construct ( protected InternalDataService  $data,
InternalRepoService  $repo,
protected InternalDomainService  $domain,
protected ResourceStakeholder  $stakeholder,
protected int  $style_id 
)

Definition at line 33 of file StyleManager.php.

39 {
40 $this->repo = $repo->style();
41 }

References ILIAS\Style\Content\Style\StyleManager\$repo.

Member Function Documentation

◆ cloneResourceContainer()

ILIAS\Style\Content\Style\StyleManager::cloneResourceContainer ( int  $from_style_id)

Definition at line 110 of file StyleManager.php.

112 : void {
113 $this->repo->cloneResourceContainer(
114 $from_style_id,
115 $this->style_id
116 );
117 }

◆ createContainerFromLocalDir()

ILIAS\Style\Content\Style\StyleManager::createContainerFromLocalDir ( string  $local_dir_path,
string  $container_path = "",
bool  $recursive = true 
)

Definition at line 82 of file StyleManager.php.

86 : string {
87 return $this->repo->createContainerFromLocalDir(
88 $this->style_id,
89 $local_dir_path,
90 $this->stakeholder,
91 $container_path,
92 $recursive
93 );
94 }

◆ createContainerFromLocalZip()

ILIAS\Style\Content\Style\StyleManager::createContainerFromLocalZip ( string  $local_zip_path)

Definition at line 72 of file StyleManager.php.

74 : string {
75 return $this->repo->createContainerFromLocalZip(
76 $this->style_id,
77 $local_zip_path,
78 $this->stakeholder
79 );
80 }

◆ getPath()

ILIAS\Style\Content\Style\StyleManager::getPath ( bool  $add_random = true,
bool  $add_token = true 
)

Definition at line 56 of file StyleManager.php.

59 : string {
60 return $this->repo->getPath(
61 $this->style_id,
62 $add_random,
63 $add_token
64 );
65 }

◆ getResourceIdentification()

ILIAS\Style\Content\Style\StyleManager::getResourceIdentification ( )

Definition at line 67 of file StyleManager.php.

67 : ?ResourceIdentification
68 {
69 return $this->repo->getResourceIdentification($this->style_id);
70 }

◆ importFromUploadResult()

ILIAS\Style\Content\Style\StyleManager::importFromUploadResult ( UploadResult  $result)

Definition at line 96 of file StyleManager.php.

98 : int {
99 $imp = new \ilImport();
100 return $imp->importObject(
101 null,
102 $result->getPath(),
103 $result->getName(),
104 "sty",
105 "",
106 true
107 );
108 }

◆ writeCss()

ILIAS\Style\Content\Style\StyleManager::writeCss ( )

Definition at line 43 of file StyleManager.php.

43 : void
44 {
45 $builder = $this->domain->cssBuilder(
46 new \ilObjStyleSheet($this->style_id)
47 );
48 $css = $builder->getCss();
49 $this->repo->writeCss(
50 $this->style_id,
51 $css,
52 $this->stakeholder
53 );
54 }
Class ilObjStyleSheet.

Field Documentation

◆ $repo

StyleRepo ILIAS\Style\Content\Style\StyleManager::$repo
protected

Definition at line 32 of file StyleManager.php.

Referenced by ILIAS\Style\Content\Style\StyleManager\__construct().


The documentation for this class was generated from the following file: